Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 2003 won't run simple code that Excel XP and Excel 2000 will run
Hi All,
I was wondering if anyone had come across this problem. I have two separate applications in which Excel 2003 will not run my code. On one application, it won't recognize a userform when I am in a sub, but if I call the userform in the parent sub that calls the problem sub, it will recognize it. Strange! In the other one, the code is simple: thisworkbook.activate sheets("data entry").activate It chokes on the 2nd line. I even tried: thisworkbook.activate x = activesheet.name and it choked on that too. The error is: Run-time error '32809' Application-defined or object-defined error. Any ideas? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 2003 won't run simple code that Excel XP and Excel 2000 will run
Hi Moses, I am taking a bit of a stab in the dark, but I have seen some
similar problems if the windows in taskbar option is not turned off. I use the following code upon opening a workbook: If Application.Version = "11.0" Then Application.ShowWindowsInTaskbar = False End If HTH--Lonnie M. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 2003 won't run simple code that Excel XP and Excel 2000 will run
As for the second issue try something like this:
Dim DataEntry As Worksheet Set DataEntry = Workbook("workbookNameHere.xls").Worksheet("Data Entry") 'OR if data entry is active: 'Set DataEntry = ActiveWorkbook.ActiveSheet DataEntry.Activate HTH--Lonnie M. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 2003 won't run simple code that Excel XP and Excel 2000 will run
I don't get it. (Oh, I am Moses, by the way). As Lonnie suggested, I
added something like Dim DE as worksheet set DE = sheets("Data Entry") DE.activate and now it works. So, why did it work before in Excel 2000 and Excel 97 but didn't work in Excel 2003? Is there something to learn here? *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 2003 won't run simple code that Excel XP and Excel 2000 will run
I don't get it. Lonnie's solution worked.
Instead of this: sheets("Data Entry").activate I used the following code: dim DE as worksheet set DE = sheets("Data Entry") DE.activate and it worked! Now why is that? Why did the simpler code work in Excel 97 or Excel 2000 but not in Excel 2003? Does anyone know? Is there something to learn here? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Upgrade from Excel 2000 to Excel 2003 without MS Office 2003? | Excel Discussion (Misc queries) | |||
Excel 2003 crashes loading excel files created Excel 2000 | Excel Discussion (Misc queries) | |||
Converting VB Code for Excel 2000 to Excel 2003 | Excel Programming | |||
Code-signing certificate problems in Excel 2000 with Windows 2000 | Excel Programming | |||
Excel VBA Code Execution Excel XP Vs Excel Office 2000 | Excel Programming |