Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 103
Default Verify correct cell

I have a rectangle on Sheet1, when the user clicks this rectangle I want to
make sure they are in 1 of 7 cells that will receive the information they
will enter from a userform. If they are in one of these 7 cells the userform
will load but if they are not a message will show that they are in the wrong
cell and cannot enter the information. Can this be done?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 112
Default Verify correct cell

Hi
Dim ChkRng
Set ChkRng = Intersect(ActiveCell, Range("A1:A7"))
If ChkRng Is Nothing Then
MsgBox "Sorry, can't go further active cell is not in the required range"
Exit Sub
Else
'do your stuff
End If

HTH
Cordially
Pascal

"jnf40" a écrit dans le message de news:
...
I have a rectangle on Sheet1, when the user clicks this rectangle I want to
make sure they are in 1 of 7 cells that will receive the information they
will enter from a userform. If they are in one of these 7 cells the
userform
will load but if they are not a message will show that they are in the
wrong
cell and cannot enter the information. Can this be done?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 103
Default Verify correct cell

Thanks worked great.

"papou" wrote:

Hi
Dim ChkRng
Set ChkRng = Intersect(ActiveCell, Range("A1:A7"))
If ChkRng Is Nothing Then
MsgBox "Sorry, can't go further active cell is not in the required range"
Exit Sub
Else
'do your stuff
End If

HTH
Cordially
Pascal

"jnf40" a écrit dans le message de news:
...
I have a rectangle on Sheet1, when the user clicks this rectangle I want to
make sure they are in 1 of 7 cells that will receive the information they
will enter from a userform. If they are in one of these 7 cells the
userform
will load but if they are not a message will show that they are in the
wrong
cell and cannot enter the information. Can this be done?




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
How to verify addresses and zip codes are correct? In bulk... motol Excel Programming 3 August 14th 06 06:52 AM
Verify Active Cell is within a Range that changes as cell is delet Shannon Excel Programming 2 February 11th 06 12:01 AM
Verify Active Cell Brian Matlack[_33_] Excel Programming 2 November 29th 05 06:04 PM
Verify if Comment exist in a cell Tom LeBold Excel Discussion (Misc queries) 2 September 15th 05 08:47 PM
verify cell if is the same benny Excel Programming 1 July 8th 04 03:55 PM


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