Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm getting a 'Subscript out of range' error on a line of code as follows
ThisWorkbook.VBProject.VBComponents(ActiveSheet.Co deName).Properties("_CodeName").Value = "Output" & Now * 10000000000# The odd thing is the fact that this only occurs the first time the code is run when the workbbok is opened and, when I select debug the error, all I simply do is press run (play button) and the code conitnues on perfectly with the new codename for the active sheet. I've also changed the 'NOW * 10000000000#' to '12' and I got the same error (I couldn't test it for the second use as a codename conflict would occur). Any thoughts as to why this happens and how to fix it would be greatly appreciated. I already have tried 'On Error Resume Next' but that didn't work. It still halted my procedure. -- Cheers! Richard Reye "Never argue with an idiot. They'll bring you down to their level then beat you with experience" - someone |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
what does 'Subscript Out of range' mean?? | Excel Worksheet Functions | |||
9: Subscript out of range | Excel Discussion (Misc queries) | |||
Subscript is out of Range | Excel Programming | |||
Subscript out of range | Excel Programming | |||
Subscript Out of Range | Excel Programming |