|
|||||||||||||||||||||
|
#1
|
|||
|
|||
|
code is not runing with excel 2007
Hi you all,
Thans for this fantastic board. I need really you help and I hope I can get it here. I've created an excel sheet (order form for our company). What I want is that when our costumers enter the event date in the cell R7 the actual date (today's date) should appear in the cell Z7 and then Z7 (today's date) should be locked because I don’t want them to change it. I've created the following VBA and it works perfect with office 2000 and XP but doesn't wont to work with Office 2007 (I’m trying to get it working for office 2007 since 3 days without success)!!! :Code:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
ActiveSheet.Range("Z7") = Date
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Application.Intersect(Target, [R7]) Is Nothing Then
Me.Protect Password:="MyPassword", UserInterfaceOnly:=True
If [R7].Value = "" Then
[Z7].Value = ""
Else
[Z7] = Date
End If
End If
End Sub
Thanks a lot Madona33 Last edited by madona33; 07-07-2008 at 05:11 PM. |
|
#2
|
||||
|
||||
|
Glad u like the forum and welcome.
Please read our forum rules below and then amend your title and wrap your code VBA Noob
__________________
_________________________________________ ![]() Credo Elvem ipsum etian vivere _________________________________________ A message for cross posters Please remember to wrap code. Forum Rules Please add to your signature if you found this link helpful. Excel links !!! |
|
#3
|
||||
|
||||
|
You won't require an answer here as you have recieved one here, you obviously didn't read our forum rules!
__________________
Regards, Simon Please read this before cross posting! Please always give feedback...good or bad! Please take the time to read the Forum Rules before posting! |
|
#5
|
||||
|
||||
|
Quote:
__________________
Hope that helps. RoyUK -------- For Excel consulting, free examples and tutorials visit my site Check out the free Excel Toolbar New members please read & follow the Forum Rules Where to copy the code to Code Tags: Make your code easier for us to read |
![]() |
| Bookmarks |
New topics in Excel 2007 Help
|
|
|
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|