LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 100
Default Error 40036 when activating a sheet

Rob

One more thought. Drag the sheet into a new workbook. You can then close the original file without saving and the sheet will still be in it.

With the sheet in a new workbook, see if you can select it there. Try changing the name if that doesn't work. Also, try cycling through each of the sheets in the new workbook and selecting the sheet, then printing out the names using the msgbox command. That way you will actually be on the sheet when the name occurs.

If that doesn't work, go back to the original file, make a copy of the sheet, delete the original sheet, rename the copy as per the original, and see if that will work. Make sure that you can select the new sheet at each stage of the process and if you get to the stage where you can't select it, you will at least know where it is falling down.


Tony

----- shinydiamond wrote: -----

Thanks for both of your suggestions.

I checked out the project objects as jpendegraft suggested.
The sheets are named correctly there. What I did notice is that the
sheet I'm trying to select is named as sheet1, when in fact it is
actually sheet5 (it's also preceded by a hidden sheet4).

So, I tried to renumber and re-order the sheets, but that doesn't work.
It still gives the same error when trying to select that same sheet no
matter what the number.

Next I tried ~x's suggetions.
I output the names of all the sheets to the debug window and everything
looks fine. (this is actually how I discovered the hidden sheets).

Then I tried indexing by sheet# as he suggested...

Sub test()
Sheets(5).Select
End Sub

And the same error message.....


Starting to feel a bit frustrated....Either this is really simple or
it's some exotic Microsoft bug.....really need to come up with a
workaround....any other ideas?

Thanks for your help

Rob


---
Message posted from http://www.ExcelForum.com/




 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem activating a sheet jowatkins[_6_] Excel Programming 1 January 19th 04 01:33 PM
Can I sort without activating / selecting sheet? Leo Elbertse Excel Programming 2 December 28th 03 06:08 PM
Problem in activating a sheet Neeleshwar Thakur Excel Programming 1 December 18th 03 12:43 PM
Selecting/Activating Control Tools Combobox on Sheet steve Excel Programming 5 October 10th 03 10:38 PM
Run-time error 40036 Dick Kusleika Excel Programming 0 August 18th 03 04:54 PM


All times are GMT +1. The time now is 05:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"