View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Robert Martim, Excel Robert Martim, Excel is offline
external usenet poster
 
Posts: 20
Default Sheets() and Window() Objects not working?

If the subscript is out of range, it means the value you gave cannot be found
within the existing range. So, your "x" is probably a number which is not
value given the context (scenario) you have.

I suggest you debug using F8 to step through the code and verify the values
as you go along. Alternatively, print them to the Immediate Window.

All I can say is that the value is not within the range, thus the error. So
you need to check the value and make sure it is valid.
--
Robert
Author of RibbonX: Customizing the Office 2007 Ribbon:
LATEST INTERACTIVE TUTORIAL:
http://www.msofficegurus.com/videos/...p_HT_Chart.asp
FORUM: http://www.msofficegurus.com/forum/