VBA code works in 2003 but NOT 2010

dsrt16

Board Regular
Joined
Jun 18, 2005
Messages
208
Original Post: http://www.ozgrid.com/forum/showthread.php?t=157681&p=573896&posted=1#post573896

I hope I cross post correctly with the link.

I wrote a line of code to rename worksheets, and it works in 2003, but not 2010. My work has excel 2010, and I am suppose to show my program to my boss today, but I can't get the code to run in 2010.

Every time I open the workbook, I get the following error message: -2147417843 An outgoing call can not be made since the application is dispatching an input synchronous call.

Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
ActiveSheet.Name = Sheets("Set-up Page").Range("B2").Value
End Sub

Each worksheet has that code referencing a different cell. It works perfectly at home, but not at work. I have two hours before I am suppose to present the program I created....HELP!
 
I also successfully open a 2003 excel document which I created years ago that had one macro in it. It opened on my work computer with 2010 just fine, so it seems it is just this workbook. It doesn't like something in it.

Is there some way to easily figure out which code is causing the problem? But the fact that the error message comes up right when I open the workbook makes me wonder if it is even code that is causing the problem. I don't know...I am clueless on this one.
 
Upvote 0

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
I did load the morefunc add-in, but I haven't opened any of the workbooks that use the indirect.ext formula. I only opened the first workbook in my program, and it doesn't use that. I am confused with that add-in. I am using it in my formulas, but I don't know if when I downloaded it, it attached to the program itself or just downloaded to my computer at home.
 
Upvote 0
I deleted every macro and activex control button. And I am just copying and pasting in my code instead of rebuilding the program. This will save a ton of time, but I still would like to know why this happened if anyone happens to know. What a nightmare!
 
Upvote 0
I can copy and paste over the code and have it run, so yay for that at least.
 
Last edited:
Upvote 0
Ok WOW! I am going to hit the wall.

Apparently, I can not even create user forms. In my "new workbook" that had everything except the macros. I went insert, user form, to recreate my user forms, and I got that error message.

If I open a blank workbook, I can create a userform, but if I go into my resaved version of my program (the one without any macros or userforms in it) just the formulas and data in the cells, I can't.

Why? What the heck is going on? I can't rebuild this whole program all over again.
 
Upvote 0
Time! It took me forever the first time around. But its okay, I got the user forms to work. I just had to vent on this board because this is the most frustrating thing I have ever experienced. I have programmed 3 programs for my school that I always build at home, and I have never had this problem. But this is the first year my school switched to 2010 software.

In the future, I shouldn't build my programs at home. It is just easier in the comfort of my home. :D
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,834
Members
452,947
Latest member
Gerry_F

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top