Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
visual basic code in 2003 vs 2007
I have some visual basic code that runs in an excel 2003 spreadsheet.
It runs on some PC's that have excel 2007, but not all, so I'm guessing it's some sort of setting within excel??? I have macros enabled on 2007 but it must be some other setting???? Any ideas where I can look? Here is the visual basic code. As I said, it runs on some PC's with excel 2007 installed, just not all of them. Any ideas? As I said, I ahve macros enabled on all of them. Sub Worksheet_Change(ByVal Target As Excel.Range) If Intersect(Range("C7:C14"), Target) Is Nothing Then Exit Sub Application.EnableEvents = False Range("c2").Value = Now() Application.EnableEvents = True End Sub thanks, ga George Applegate c |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
visual basic code in 2003 vs 2007
What happens on the pc's where it doesn't work?
If you're positive that macros are enabled, then maybe you turned off events (while testing???) and didn't re-enable them. Open the VBE (alt-F11) Show the immediate window (ctrl-g) type this: application.enableevents = true and hit enter Then back to excel to test. If this doesn't help, you may want to explain what happens where it doesn't work. George Applegate wrote: I have some visual basic code that runs in an excel 2003 spreadsheet. It runs on some PC's that have excel 2007, but not all, so I'm guessing it's some sort of setting within excel??? I have macros enabled on 2007 but it must be some other setting???? Any ideas where I can look? Here is the visual basic code. As I said, it runs on some PC's with excel 2007 installed, just not all of them. Any ideas? As I said, I ahve macros enabled on all of them. Sub Worksheet_Change(ByVal Target As Excel.Range) If Intersect(Range("C7:C14"), Target) Is Nothing Then Exit Sub Application.EnableEvents = False Range("c2").Value = Now() Application.EnableEvents = True End Sub thanks, ga George Applegate c -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Visual Basic code | Excel Discussion (Misc queries) | |||
Protecting Code in Visual Basic Editor (Excel 2003) | Excel Worksheet Functions | |||
Visual Basic module from Excel 2003 crashing in Excel 2007 | Excel Discussion (Misc queries) | |||
I need a visual basic code....please | Excel Discussion (Misc queries) | |||
changing the visual basic in office 2003 to visual studio net | Excel Discussion (Misc queries) |