Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 184
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 184
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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
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
Upgrade from Excel 2000 to Excel 2003 without MS Office 2003? brigida3 Excel Discussion (Misc queries) 1 January 22nd 06 05:13 PM
Excel 2003 crashes loading excel files created Excel 2000 Jeff Lewin Australia Excel Discussion (Misc queries) 0 June 27th 05 04:20 AM
Converting VB Code for Excel 2000 to Excel 2003 MarkPirks Excel Programming 2 January 5th 05 12:37 AM
Code-signing certificate problems in Excel 2000 with Windows 2000 Aaron Queenan Excel Programming 0 May 6th 04 11:35 AM
Excel VBA Code Execution Excel XP Vs Excel Office 2000 John Flynn Excel Programming 6 August 24th 03 04:58 AM


All times are GMT +1. The time now is 08:20 PM.

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

About Us

"It's about Microsoft Excel"