Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 92
Default Limiting the cells a command button can change

I have a command button that when clicked, it changes some of the cell properties. I would like to limit the cells that the command button can change. I would like to say that if the activecell is within a range, then make the changes. Otherwise if not, exit sub. I'm not sure how to write the code so that the button is limited to a certain range of cells. Thanks for any help. Matt
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Limiting the cells a command button can change

if Not intersect(selection,Range("B9:H20")) is Nothing then


change selection to activecell if that is preferred.

--
Regards,
Tom Ogilvy

"Matt" wrote in message
...
I have a command button that when clicked, it changes some of the cell

properties. I would like to limit the cells that the command button can
change. I would like to say that if the activecell is within a range, then
make the changes. Otherwise if not, exit sub. I'm not sure how to write
the code so that the button is limited to a certain range of cells. Thanks
for any help. Matt


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
Change color of command button dhstein Excel Discussion (Misc queries) 1 May 21st 09 01:08 AM
Where is toolbar command button to change percentage of screen? excelsior Excel Discussion (Misc queries) 4 January 5th 09 05:30 AM
CHANGE DATA SERIES WITH A COMMAND BUTTON Raymond Willis Charts and Charting in Excel 5 December 5th 05 05:49 PM
Change Name of Command Button comotoman Excel Discussion (Misc queries) 2 October 26th 05 05:23 PM
Change active cell properties with command button Nick Excel Programming 2 January 30th 04 05:11 PM


All times are GMT +1. The time now is 05:41 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"