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-07-2008, 04:01 PM
madona33 madona33 is offline
Registered User
 
Join Date: 07 Jul 2008
Location: UK
Posts: 2
madona33 is on a distinguished road
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
Any ideas ?

Thanks a lot

Madona33

Last edited by madona33; 07-07-2008 at 05:11 PM.
Reply With Quote
  #2  
Old 07-07-2008, 04:06 PM
VBA Noob's Avatar
VBA Noob VBA Noob is offline
Wicked Forum Moderator
 
Join Date: 25 Apr 2006
Location: London, England
Posts: 10,922
VBA Noob will become famous soon enough VBA Noob will become famous soon enough
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 !!!
Reply With Quote
  #3  
Old 07-07-2008, 04:50 PM
Simon Lloyd's Avatar
Simon Lloyd Simon Lloyd is offline
Administrator
 
Join Date: 02 Mar 2004
Location: Cheshire, UK
Posts: 4,073
Simon Lloyd will become famous soon enough Simon Lloyd will become famous soon enough
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!
Reply With Quote
  #4  
Old 07-07-2008, 05:16 PM
madona33 madona33 is offline
Registered User
 
Join Date: 07 Jul 2008
Location: UK
Posts: 2
madona33 is on a distinguished road
Hi Simon & VBA Noob,

Sorry about this but I did it because I need an answer ASAP (It is for the company I' am working for and the code must be runing with excel 2007 ASAP)


Sorry again

Madona 33
Reply With Quote
  #5  
Old 07-08-2008, 04:27 AM
royUK's Avatar
royUK royUK is offline
Forums Administrator
 
Join Date: 18 Nov 2003
Location: Lincolnshire,UK
Posts: 6,552
royUK will become famous soon enough royUK will become famous soon enough
Quote:
Originally Posted by madona33
Hi Simon & VBA Noob,

Sorry about this but I did it because I need an answer ASAP (It is for the company I' am working for and the code must be runing with excel 2007 ASAP)


Sorry again

Madona 33
It doesn't mater ow quickly you want the answer you must follow the rules if you want free help!
__________________
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
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:11 AM.


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