visual basic code in 2003 vs 2007

G

George Applegate

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
(e-mail address removed)
 
D

Dave Peterson

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top