View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
sali[_2_] sali[_2_] is offline
external usenet poster
 
Posts: 24
Default macro v active x control

"BLJ" wrote in message
u...
Hi below is the gist

Workbooks.Open Filename:="C:\stats.xls"
Windows("stats.xls").Activate
Rows("3:3").Select
Selection.Insert Shift:=xlDown

the error occurs when it hits the "rows" .


maybe you have a problem with context, since you have no object qualifier
for rows()

have you tried

dim wb as workbook, ws as worksheet
set wb=Workbooks("\stats.xls")
set ws=wb.activesheet
ws.rows("3:3").select