Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel 97 Macros

Status
Not open for further replies.

vincej

Technical User
Nov 13, 2002
7
US
I created a macro using Excel 97 and am trying to get it to run within Excel 2000. Excel 2000 recognizes part of the macro command, but the other part it cannot load. The part of the macro not functioning properly is a date insert, which is 'Date' in 97. What is the correct command, if there is one, that will insert the date properly regardless if I am using 97 or 2000?
 
Date also returns the current in XL2000.

Could you post the code that is giving problems ?

In the meantime, check (in VBE) Tools, References and check to see if any are marked MISSING. If so unselect them and that may resolve the problem.

A.C.
 
Here is the macro...

Private Sub Tog_C11_Click()
If Tog_C11.Value = True Then

Range("C7:C11").Select
With Selection.Interior
.ColorIndex = 6
.Pattern = xlSolid
End With
Range("C11").Select
ActiveCell.FormulaR1C1 = Date
Else

Range("C7:C11").Select
Selection.Interior.ColorIndex = xlNone
Range("C11").Select
Selection.ClearContents
End If
End Sub
 
just try activecell = date (this will actually leave the static date ) so it want change unless code is executed
otherwise try ActiveCell.FormulaR1C1 = "=today()" [yinyang] Tranpkp [pc2]
************************************
- Let me know if this helped/worked!

Remember to give helpful posts the stars they deserve, this facilitates others navigating through the threads / posts!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top