selecting columns to change format

  • Thread starter Thread starter mechi
  • Start date Start date
M

mechi

Hi!
I'm using Excel 2003 and VBScript.
I'm trying to change formats of specific columns. I get an error of
"missing Object" with the objRange. Is this the way to do it?


Set objRange = objWorksheet.Columns("D:E").Select
objRange.NumberFormat = "0.0000"

Set objRange = objWorksheet.Columns("B:B").Select
objRange.NumberFormat = "[$-1010409]d/m/yyyy h:mm;@"

Set objRange = objWorksheet.Cells("D1").Select
objRange.FormulaR1C1 = "=RC[-2]"

Set objRange = objWorksheet.Range("D").Select
objRange.FillDown

Thanks for any help!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top