Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Rob Gould
 
Posts: n/a
Default Macro not running on Office 2000, only 2003

Hi,

Can anyone please tell me why the code below would run perfectly in
Excel 2003, but not Excel 2000 (and 97 I assume). It stops on the Paste
Special section:

If Not IsDate([C1].Value) Then
MsgBox "Please enter a date in C1!"
[C1].Value = "Enter date here"
Exit Sub
Else
thisDate = Range("Production!C1").Value
Sheets("Data").Select
ActiveSheet.Unprotect
Range("G1:BH1").Select
Selection.Copy
Range("E6").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Find(What:=thisDate, After:=ActiveCell,
LookIn:=xlFormulas _
, LookAt:=xlPart, SearchOrder:=xlByRows,
SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.Offset(0, 2).Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True,
Scenarios:=True
Sheets("Production").Select
Range("C1").Select
ActiveCell.FormulaR1C1 = "Enter date here"
Sheets("PAC Track").Select
Range("C6").Select
Application.CutCopyMode = False
End If
End Sub

Many thanks.

Rob

  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

If you do Edit|Find in xl2002+, you'll see that's it's been enhanced to allow
you to look at formats, too.

The same thing happened in code.

This portion of your .find line should be removed:
SearchFormat:=False

As a general rule, it's probably better to develop in the oldest version of
excel that the users have.

Rob Gould wrote:

Hi,

Can anyone please tell me why the code below would run perfectly in
Excel 2003, but not Excel 2000 (and 97 I assume). It stops on the Paste
Special section:

If Not IsDate([C1].Value) Then
MsgBox "Please enter a date in C1!"
[C1].Value = "Enter date here"
Exit Sub
Else
thisDate = Range("Production!C1").Value
Sheets("Data").Select
ActiveSheet.Unprotect
Range("G1:BH1").Select
Selection.Copy
Range("E6").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Find(What:=thisDate, After:=ActiveCell,
LookIn:=xlFormulas _
, LookAt:=xlPart, SearchOrder:=xlByRows,
SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.Offset(0, 2).Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True,
Scenarios:=True
Sheets("Production").Select
Range("C1").Select
ActiveCell.FormulaR1C1 = "Enter date here"
Sheets("PAC Track").Select
Range("C6").Select
Application.CutCopyMode = False
End If
End Sub

Many thanks.

Rob


--

Dave Peterson
  #3   Report Post  
Rob Gould
 
Posts: n/a
Default

Thanks Dave. I re-created the macro in 2000 and compared it to 2003
and found that little extra part.

Rob

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
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? Richard Excel Discussion (Misc queries) 2 May 13th 23 11:46 AM
Office 97 to 2003: Excel: enter data w/fixed 2 decimal. 2000. be. terrier New Users to Excel 1 January 29th 05 10:59 AM
Office 97 to 2003: Excel: enter data w/fixed 2 decimal. 2000. be. terrier New Users to Excel 0 January 29th 05 06:11 AM
Do I need Office 2003 to download templates ? Have Office 2000. rjwilde Excel Discussion (Misc queries) 0 January 21st 05 01:45 AM
MY EXEL/WORD OFFICE 2000 IS RUNNING VERY SLOW AFTER DOWNLOADING U. STEVE CAMPBELL Excel Discussion (Misc queries) 1 December 7th 04 05:59 PM


All times are GMT +1. The time now is 02:29 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"