#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default Tom Ogilvy

Hi Tom

I think I lost you in previous discussion.

However, your code for changing text on one button works great, but when
trying the code for changing 30 buttons, I get a "compile Error" in
codeline:

If not Intersect(Target.Address, Range("A2:A31)) is Nothing _
And Target.Value < "" Then

Can you help me with that, please!

//Thomas




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Tom Ogilvy

If not Intersect(Target.Address, Range("A2:A31)) is Nothing _
And Target.Value < "" Then


You're missing a " after A31.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"Jonsson" wrote in message
...
Hi Tom

I think I lost you in previous discussion.

However, your code for changing text on one button works great,
but when
trying the code for changing 30 buttons, I get a "compile
Error" in
codeline:

If not Intersect(Target.Address, Range("A2:A31)) is Nothing _
And Target.Value < "" Then

Can you help me with that, please!

//Thomas






  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Tom Ogilvy

Its worse than that
If not Intersect(Target.Address, Range("A2:A31)) is Nothing _
And Target.Value < "" Then

Should be

If not Intersect(Target, Range("A2:A31")) is Nothing _
And Target.Value < "" Then

but I posted a tested version in the original thread. (tested against my
assumptions as stated).


--
Regards,
Tom Ogilvy


"Chip Pearson" wrote in message
...
If not Intersect(Target.Address, Range("A2:A31)) is Nothing _
And Target.Value < "" Then


You're missing a " after A31.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"Jonsson" wrote in message
...
Hi Tom

I think I lost you in previous discussion.

However, your code for changing text on one button works great,
but when
trying the code for changing 30 buttons, I get a "compile
Error" in
codeline:

If not Intersect(Target.Address, Range("A2:A31)) is Nothing _
And Target.Value < "" Then

Can you help me with that, please!

//Thomas








  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default Tom Ogilvy

Thanks, now it's working great!
What if I have the buttons in a range B9:F26. Obviosly the code wont work,
I can see that.
What has to be changed and how?

//Thomas
"Tom Ogilvy" skrev i meddelandet
...
Its worse than that
If not Intersect(Target.Address, Range("A2:A31)) is Nothing _
And Target.Value < "" Then

Should be

If not Intersect(Target, Range("A2:A31")) is Nothing _
And Target.Value < "" Then

but I posted a tested version in the original thread. (tested against my
assumptions as stated).


--
Regards,
Tom Ogilvy


"Chip Pearson" wrote in message
...
If not Intersect(Target.Address, Range("A2:A31)) is Nothing _
And Target.Value < "" Then


You're missing a " after A31.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"Jonsson" wrote in message
...
Hi Tom

I think I lost you in previous discussion.

However, your code for changing text on one button works great,
but when
trying the code for changing 30 buttons, I get a "compile
Error" in
codeline:

If not Intersect(Target.Address, Range("A2:A31)) is Nothing _
And Target.Value < "" Then

Can you help me with that, please!

//Thomas










  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Tom Ogilvy

B9:F26 is only half the story. Where does the button over B9 get its value
from (to use as the caption). How about the buttons over B10, Button over
F26?

--
Regards,
Tom Ogilvy

"Jonsson" wrote in message
...
Thanks, now it's working great!
What if I have the buttons in a range B9:F26. Obviosly the code wont

work,
I can see that.
What has to be changed and how?

//Thomas
"Tom Ogilvy" skrev i meddelandet
...
Its worse than that
If not Intersect(Target.Address, Range("A2:A31)) is Nothing _
And Target.Value < "" Then

Should be

If not Intersect(Target, Range("A2:A31")) is Nothing _
And Target.Value < "" Then

but I posted a tested version in the original thread. (tested against

my
assumptions as stated).


--
Regards,
Tom Ogilvy


"Chip Pearson" wrote in message
...
If not Intersect(Target.Address, Range("A2:A31)) is Nothing _
And Target.Value < "" Then

You're missing a " after A31.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"Jonsson" wrote in message
...
Hi Tom

I think I lost you in previous discussion.

However, your code for changing text on one button works great,
but when
trying the code for changing 30 buttons, I get a "compile
Error" in
codeline:

If not Intersect(Target.Address, Range("A2:A31)) is Nothing _
And Target.Value < "" Then

Can you help me with that, please!

//Thomas












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
Thank You Tom Ogilvy Brian Excel Worksheet Functions 0 December 16th 04 02:47 AM
Tom Ogilvy halem2[_26_] Excel Programming 4 September 17th 04 03:26 PM
Thank u Tom Ogilvy helmekki[_19_] Excel Programming 0 August 7th 04 04:31 PM
Tom Ogilvy David Joseph Excel Programming 0 April 21st 04 02:57 PM
Tom Ogilvy David Joseph Excel Programming 0 April 21st 04 02:37 PM


All times are GMT +1. The time now is 10:31 PM.

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

About Us

"It's about Microsoft Excel"