LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 989
Default 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
 
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
VBA Excel code not working properly (HELP!) zulfer7 Excel Discussion (Misc queries) 3 April 5th 07 10:49 PM
My code is still not working -- Excel 2000 Worksheet protection Bill Case Excel Programming 2 September 19th 06 03:56 PM
Excel 2000 VBA Code not working in Excel 2002 OldGuy[_2_] Excel Programming 1 August 6th 04 06:26 AM
Excel 2000 code not working in XP Shane J Excel Programming 2 January 31st 04 03:40 AM
Need advice and code help with working with *.dbf files in Excel 97 TBA[_2_] Excel Programming 1 September 8th 03 09:14 AM


All times are GMT +1. The time now is 11:18 AM.

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

About Us

"It's about Microsoft Excel"