Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with Excel VBA (Automation Error)

Status
Not open for further replies.

comfortablethumb

Technical User
Aug 30, 2007
2
GB
Ok, i have been working on a workbook for the past couple of days, and i have ran into a little trouble, this workbook is quite large, with about 7/8 sheets and i use control buttons so the user can navigate through them.

One of these sheets is named 'Input' and i basically use the code Sheets("Input").Select to switch to this particular sheets, but alas now that im right at the end of making this workbook everything time i try to execute this command i get a debug error saying:

Run-time error '2147319765 (8002802b)':

Automation Error
Element not found


For the life of me i cant work out why it has just began to do this, as it wasnt doing this when i first started making the workbook...

Anyhelp on this matter would be much appreciated
 




Hi,

Did you change the name of your sheet?

I prefer NOT to use the Sheet Name. Rather, I give a value to the Sheet CodeName in the VB Editor Project Explorer. For instance, if the Sheet is named Input, I make the CodeName wsInput and use the code like this...
Code:
wsInput.Activate
In this way, the user (or designer) can't mess up your code by renaming a sheet.


Skip,

[glasses] When a group touring the Crest Toothpaste factory got caught in a large cooler, headlines read...
Tooth Company Freeze a Crowd! and
Many are Cold, but Few are Frozen![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top