Code not working in Excel 11
I have the following snippet of code which when run in Excel 10 works fine,
but for some reason doesn't work in Excel 11. Can anyone offer any solutions
for this please?
I have a form which users input a number as a string lets says it's "1150"
This is the part that doesn't work - it doesn't activate the respective
workbook
Workbooks(AName & " - (1000-1999)").Activate
SNIPPET
AName = Left(ActiveWorkbook.Name, 14)
ControlBook = ActiveWorkbook.Name
On Error GoTo NewBadge
If IsNumeric(BadgeNumber) Then
lBadge = CLng(BadgeNumber)
Select Case lBadge
Case 1 To 1000
Workbooks(AName & " - (1000-1999)").Activate
' this on error causes a fail to find to go to create a new record
Worksheets(BadgeNumber).Activate
Application.StatusBar = "You are now editing " + BadgeNumber + "'s "
+ AName + " record...."
etc....
--
Mark
|