Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel formats thru VBA

Status
Not open for further replies.

grasupt

MIS
Jun 14, 1999
13
US
I have an worksheet where many of the cells have "formatted using the "custom" property. When I print those cells to a file they lose their formatting.
Any idea's?

This is the print line:

Print #FileNum, Trim(Cells(RowCount, _
ColumnCount).Value);
 
Skip that,

The answer is Format(element,"format"), where format is the exact format. Format(99.99,"$00.00")

 
I kinda/maybe/might have a similiar issue. I want the format of the Excel/Cells to be the same as the table that I export to Excel. The table has the proper formats that I want, for example; some columns might have Doubles w/1 decimal where another will have Double w/2 decimals. Again, the table is SHOWING the right format, but Excel does not keep the ideal format. If it helps, I export via a Macro execution.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top