Windows 2000Pro vs NT

T

Todd

I have code like the following. I am currently using 2000
Professional and the code works perfectly. When I send
this spreadsheet to someone running NT it will not run the
Sheets("COMPLETED").Move Before:=Sheets(29) code. Are
there any workarounds so that this code will work on both
platforms? Thanks for the help!

Public Sub BANKRY()
If Worksheets("INDEX").CheckBox1.Value = False Then Exit
Sub
Sheets("BANKRY").Visible = True
Sheets("COMPLETED").Visible = True
Sheets("COMPLETED").Move Before:=Sheets(29)
Sheets("INDEX").Select
End Sub
 
D

Dave Peterson

What kind of error do you/your user get?

It looks fine to me. (I don't think the difference in OS versions would affect
this code.)
 
A

AlfD

Hi!

Might be worth a check to see whether Sheets(29) really is the shee
you think it is.

Al
 
T

Todd

It is just strange to me that when anybody using 2000 Pro
opens this file and begins the code it works fine but when
an NT user tries it the code won't work. I am not sure of
the error message the NT user gets
but when they "Debug" the code it sends them straight to
the Move.Before line of the code.
 
T

Todd

I am not sure of the exact error message they are getting
but when they debug it goes straight to the Move.Before
line of the code. It is just strange that all 2000 Pro
users don't have a problem with the code but NT users do.
Is there any other possibilities that you know of that
could help?
 
D

Dave Peterson

I don't have a guess.

Sorry.

Anything that I could think of would break in both environments--missing
worksheets/less than 29...

I got nothing.
 
Top