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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formatting a cell 1

Status
Not open for further replies.

mkjp2011

Programmer
Aug 24, 2010
15
0
0
US
Hello,
How would you change the formatting of a cell from Number to Custom 0?

Also, how would you add borders to the cell?

Here is how I instantiate the excel object:

Set excelReport = CreateObject("Excel.Application")
excelReport.Workbooks.Add
Set excelSheet1 = excelReport.ActiveWorkbook.WorkSheets(1)
 


hi,
Code:
 Set excelReport = CreateObject("Excel.Application")
 excelReport.Workbooks.Add
 Set excelSheet1 = excelReport.ActiveWorkbook.WorkSheets(1)  
  excelSheet1.Cells(1,1).NumberFormat = "0"

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top