Formatting of Excle during Export from VB

ssripada

New Member
Joined
Sep 2, 2002
Messages
3
hI ,

I am currently exporting data(Reports) from MSFLEXGRID to Excel .Is there a way to format the columns in the Excle sheet because the users have to each time drag a column to look at the headers .

Appreciate a quick reply (My job depends on this)
Thanks
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
In VB, use GetObject after creating the new xl file to get a reference to the workbook. You can then manipulate the book's properties in your VB app. Alternately (early binding) set a ref. to the excel library in your VB app.

Even more impressive is to put an OLE container on a form and put in an excel spreadsheet (instead of flexgrid). Then you can populate the sheet and save it, all in your VB app.
This message was edited by Swamp Thing on 2002-09-03 20:57
 
Upvote 0
Probabbly I dint explain better,
I currently have the excel object instantiated and the data populates into the excel shett and all that is fine.

The problem is in the display of the data in the excel sheet .All the columns (headers)dont autofit and the user has to again reformat the Display .
 
Upvote 0
On 2002-09-04 08:05, Swamp Thing wrote:
<pre>
Columns("A:J").Select
Selection.Columns.AutoFit</pre>


Which is the sort of thing that would have been obtained if Abdc's suggestion had been followed.

(Would suggest that the job vacancy link be kept handy!)
 
Upvote 0

Forum statistics

Threads
1,225,846
Messages
6,187,363
Members
453,420
Latest member
ESCH1021

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top