Best Fit datasheet/table column width using VBA code.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there any way to use VBA code to minic the Format>Column Width>Best Fit
menu and address all the columns in a datasheet/table?
 
My standard reply to Datsheet formatting issues is:
For programmatic control of forms in Datasheet view my standard response
is:


1) Michael Kaplan has an excellent article on manipulating Datasheets
here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsmart
01/html/sa01b1.asp


2) An API solution is here:
http://www.lebans.com/autocolumnwidth.htm
The AutoSizing project also contains a method to FREEZE the
ColumnWidths.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
Thanks for the information. I tried Michael Kaplan's code. Works good for
my current application.
 
Back
Top