ExcelTip.com
Account Icon Account Icon Account Icon
ExcelTip.com

Go Back   Excel Help Forum > Usenet Groups > Excel 2007 Help

Notices

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-18-2008, 05:25 PM
Lift Off Lift Off is offline
Registered User
 
Join Date: 13 Apr 2004
Posts: 30
Lift Off
Why doesn't this line work in 2007

The macro has this line of code and works well in Excel 2003. Can someone explain why this line stops the macro using 2007?

Code:
z = Workbooks("master").Worksheets("sheet1").Cells(Rows.Count, 2).End(xlUp).Row + 4
Work around???

Thanks,

Last edited by VBA Noob; 07-18-2008 at 06:08 PM.
Reply With Quote
  #2  
Old 07-18-2008, 07:04 PM
shg's Avatar
shg shg is online now
Forum Moderator
 
Join Date: 21 Jun 2007
Location: Dallas, Texas
Posts: 5,792
shg will become famous soon enough shg will become famous soon enough
Subscript out of range error?
Reply With Quote
  #3  
Old 07-18-2008, 10:59 PM
Lift Off Lift Off is offline
Registered User
 
Join Date: 13 Apr 2004
Posts: 30
Lift Off
Exactly!

You obviously have a clue!

Thanks in advance.
Reply With Quote
  #4  
Old 07-19-2008, 01:57 AM
shg's Avatar
shg shg is online now
Forum Moderator
 
Join Date: 21 Jun 2007
Location: Dallas, Texas
Posts: 5,792
shg will become famous soon enough shg will become famous soon enough
Either there is no workbook open called "master" (maybe master.xls or master.xlsm, or ...), or there is no sheet named sheet1.

It doesn't have anything to do with Excel 2007.
Reply With Quote
  #5  
Old 07-22-2008, 12:13 PM
Lift Off Lift Off is offline
Registered User
 
Join Date: 13 Apr 2004
Posts: 30
Lift Off
shg:

Many thanks for your input. The code line ran fine in 2003 but failed/stopped in 2007.

Seems you are correct, the addition of the file extension, in my case .xlsm allowed the code to work in 2007 similiar to 2003.

While you say it's not a 2007 issue, I have to say that it appears 2007 requires file extensions and in earlier versions the extension is not mandatory.

Thanks for you help. It made all the difference.

Cliff
Reply With Quote
Reply

Bookmarks

New topics in Excel 2007 Help


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -4. The time now is 12:24 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0