473,325 Members | 2,308 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

autofit column width in access

Is it possible to autofit column width in Access using vba? Something
like the following in Excel:

Worksheets("Sheet1").Columns("A:I").AutoFit

Thanks in advance,

Jan 24 '07 #1
2 17898
On 24 Jan 2007 14:39:22 -0800, "Arash" <am******@gmail.comwrote:
>Is it possible to autofit column width in Access using vba? Something
like the following in Excel:

Worksheets("Sheet1").Columns("A:I").AutoFit

Thanks in advance,
This may help
http://www.lebans.com/autocolumnwidth.htm
Wayne Gillespie
Gosford NSW Australia
Jan 25 '07 #2
I've done it this with forms that are in datasheet view:
Forms("MyForm").Controls("MyControl").ColumnWidth = -2
On Jan 24, 2:39 pm, "Arash" <amahd...@gmail.comwrote:
Is it possible to autofit column width in Access using vba? Something
like the following in Excel:

Worksheets("Sheet1").Columns("A:I").AutoFit

Thanks in advance,
Jan 25 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Warren | last post by:
I am trying to capture some data from a MS Access DB which was created and populated by a VB program I did not write. I can grab all the data but I need to grab certain columns only, problem is...
2
by: Sean | last post by:
Hello, I have created a Datagrid which is populated by my program. I would like to add code to cause each column to expand to fit its largest item. This is similar to the autofit in Excel. Is...
4
by: Sean | last post by:
Hello, I would like to use the vb equivalent of the excel autofit in a datagrid. I need each column to be the size of its largest element. I do not want all the columns to be the same size. Any...
1
by: Sean | last post by:
Hello, I have a vb application in which I populate a datagrid from a database. The grid populates fine and the data is correct. I need to autofit the columns so that the width of each column is...
17
by: Mike Fellows | last post by:
im trying (unsucessfully) to add a checkbox column to my datagrid i basically have a datagrid that im populating from a dataset Me.DataGrid1.DataSource = ds.Tables(0) the datagrid then has 5...
1
by: myname | last post by:
Hello, I assign a Datatable to a Datagrid.DataSource. All the columns are displayed with the same width. I would like them to be set automatically to the best width (something like Autofit...
2
by: Lance Hoffmeyer | last post by:
Hey all, Wondering why the syntax won't autofit Column A? I am not getting any errors. Also, is there a way of reducing the number of syntax lines? Basically, I am wondering if there is an...
1
by: yoavyoavyoav | last post by:
Hi, I'm creating a project in which I create CSV files and then I want them to be displayed to the user in excel automaticlly. I used : Microsoft.Office.Interop.Excel.Application excelApp...
4
LoanB
by: LoanB | last post by:
Hi gang, Im busy writing my firs Windows Mobile 6 Application. - I'm a beginner ok. My first problem: When I run the app through the emulator I get an error: Database file cannot be found. ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.