Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Runtime error 1004
Hi,
i am using MSAccess and trying to build an Excel sheet i am using range method to put some values which i get at runtime i am getting an error - Run time Error '1004' Method 'Range'of object '_Worksheet' failed this is the sample code i am using xlSht.Range("A" & Val(lngrow + 26)).Value = rst!COLRNM this line is actually in a loop, and executes fine a few times but raises this error intermittently. Please help Gary |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Runtime error 1004
What's the value of lngrow when you get the error? Of what type is
lngrow? If lngrow is of type long, then calling VAL() is unnecessary - just use lngrow + 26. Is xlSht always a worksheet? Or might it be a chart sheet? In article , "Gary" wrote: Hi, i am using MSAccess and trying to build an Excel sheet i am using range method to put some values which i get at runtime i am getting an error - Run time Error '1004' Method 'Range'of object '_Worksheet' failed this is the sample code i am using xlSht.Range("A" & Val(lngrow + 26)).Value = rst!COLRNM this line is actually in a loop, and executes fine a few times but raises this error intermittently. Please help Gary |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
runtime error 1004 HELP PLS | Excel Discussion (Misc queries) | |||
runtime error '1004' | Excel Discussion (Misc queries) | |||
What causes runtime error 1004? | Excel Discussion (Misc queries) | |||
runtime error 1004 | Excel Discussion (Misc queries) | |||
Runtime Error '1004' | Excel Discussion (Misc queries) |