I have a button that prompts for input and creates a new tab. The first run it works great, but subsequent runs throw this error:
Active3 years, 6 months ago
Here is the code:
The error is thrown on
newSheet.Name = newName and it leaves me with a sheet named 'Template (2)'
What is causing this?
In case it's relevant, here is the
updateProjectIndex sub which basically just adds a new line to the list of projects (in two places):
Dec 27, 2012 Quick access. Remove From My Forums; Asked by: Automation error: The object invoked has disconnected from its clients (Office) Microsoft Office Office 2010 - IT Pro General Discussions. I tried reinstalling Microsoft Office (2007) - that did not help. Today IT department rolled out Office 2010 and I installed that, but I.
Scott BeesonScott Beeson
72077 gold badges2828 silver badges6060 bronze badges
2 Answers
Your code works fine for me although I had to remove the additional sub calls (so I removed
updateProjectIndex(newName) AND Worksheets('Consolidated Grid').Activate Dell latitude d530 ethernet driver software.
1996 honda civic service manual pdf. To debug, try this code in a new Excel on your PC to see if the issue is workbook related to that workbook or Excel
The issue is in code in an event
Try commenting out those 2 lines of code and see if the issue persists or not. If no issue, uncomment one at a time until you see the bug, and eliminate that way.
I'd recommend you do this with a copy of your file so you can break it as much as you like!
DaveDave
23.7k99 gold badges4646 silver badges6565 bronze badges
I think I figured it out, though I'm not sure why. I had the following code in my
Workbook_Open sub:
The intent was to make sure people knew they were opening an offline version. I'm assuming the conflict was with the
Worksheets.Activate here? Maybe someone can explain.
Microsoft Access Automation Error
Either way, removing this seems to have fixed the problem 100%.
Microsoft Access Automation Error Code
Update: Replaced all the code but the Scott BeesonScott Beeson
.Activate and it is still working. I'm guessing activating a workbook from its own Workbook_Open routine was causing some sort of loop?
72077 gold badges2828 silver badges6060 bronze badges
Not the answer you're looking for? Browse other questions tagged microsoft-excelvba or ask your own question.Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |