Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Activeworkbook.range --- Not supported by VBScript?
Hi all,
I have a small script running at each startup and shutdown. At the runtime, it gives error that --- Object doesn't support this property or method; 'Activeworkbook.range' <--- Any Help is appreciated. Regards, Shetty. So far I have the following. Dim objXL Dim objWkB Dim i Dim Dr Set objXL = wscript.CreateObject("Excel.Application") objXL.Visible = False Set objWkB = objXL.WorkBooks.Open("c:\123\time.xls") objXL.activeworkbook.Range("A65536").End(xlUp).Off set(1, 0).select objXL.activeworkbook.ActiveCell.Value = Date objXL.activeworkbook.ActiveCell.Offset(0, 1).Value = Time objXL.activeworkbook.save objXL.activeworkbook.Close' Close WorkBook objXL.Visible = True objXL.Quit 'Quit Excel |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Activeworkbook.range --- Not supported by VBScript?
Hi Shetty
Range is a property attached to an Excel sheet and not to a workbook. So you may change with objWkB.Worksheets("Sheet1").Range '.... HTH Cordially Pascal "Shetty" a écrit dans le message de m... Hi all, I have a small script running at each startup and shutdown. At the runtime, it gives error that --- Object doesn't support this property or method; 'Activeworkbook.range' <--- Any Help is appreciated. Regards, Shetty. So far I have the following. Dim objXL Dim objWkB Dim i Dim Dr Set objXL = wscript.CreateObject("Excel.Application") objXL.Visible = False Set objWkB = objXL.WorkBooks.Open("c:\123\time.xls") objXL.activeworkbook.Range("A65536").End(xlUp).Off set(1, 0).select objXL.activeworkbook.ActiveCell.Value = Date objXL.activeworkbook.ActiveCell.Offset(0, 1).Value = Time objXL.activeworkbook.save objXL.activeworkbook.Close' Close WorkBook objXL.Visible = True objXL.Quit 'Quit Excel |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Is NETWORKDAYS Supported in Excel to Web Page? | Excel Worksheet Functions | |||
format not supported error | Excel Discussion (Misc queries) | |||
Maximum amount of macros supported | Excel Discussion (Misc queries) | |||
ActiveWorkbook.Protect password:=range("rangename") does not work | Excel Discussion (Misc queries) | |||
Sent to printer - Resolution not supported. | Excel Discussion (Misc queries) |