Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 23
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Visual Basic code Pickle Excel Discussion (Misc queries) 1 September 4th 08 03:35 PM
Protecting Code in Visual Basic Editor (Excel 2003) Johnny S. NH Excel Worksheet Functions 1 August 30th 08 07:26 AM
Visual Basic module from Excel 2003 crashing in Excel 2007 Chuck Angier Excel Discussion (Misc queries) 0 December 4th 07 01:42 AM
I need a visual basic code....please Rhonda Excel Discussion (Misc queries) 1 March 5th 07 01:18 PM
changing the visual basic in office 2003 to visual studio net bigdaddy3 Excel Discussion (Misc queries) 1 September 13th 05 10:57 AM


All times are GMT +1. The time now is 02:28 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"