View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Jim Rech Jim Rech is offline
external usenet poster
 
Posts: 2,718
Default VBScripting syntax for Autoformat

FYI, you cannot use _any_ named constants in a script. Try this:

Dim XL
Set XL = CreateObject("Excel.Application")
XL.Workbooks.Add
XL.Range("A1:C10").Value = 1000
XL.Range("A65536").End(-4162).AutoFormat 11
XL.Visible = True

--
Jim
"Weezy1957" wrote
in message ...
|
| Hi Jim:
|
| Thanks for the answer, but it still won't work.
|
| I have also tried:
| oSSBExcel.Range("A65536").End(xlup).AutoFormat(11)
| and
| oSSBExcel.Range("A65536").End(xlup).AutoFormat(For mat:=11)
|
| I get "unknown run time error" on that line, so I know that is the
| offending code.
|
| Any other ideas?
|
| Weezy
|
|
| --
| Weezy1957
| ------------------------------------------------------------------------
| Weezy1957's Profile:
http://www.excelforum.com/member.php...o&userid=24498
| View this thread: http://www.excelforum.com/showthread...hreadid=380924
|