#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default select cell

is there any way i can moniter the next cellwhich is
selected ? It occurs inthe midle of a macro and the user
needs to select a cell by clicking on it, and the value
of that is used in the rest of the macro.

this can either be done with a vba macro or a userform
but im guessing the code will all b the same.

Thank you for youre help
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 132
Default select cell

Hi David;

One way is to use a call for an Input Box and then declare
the type to 8. That will force the user to return a range
that you can then use.

Thanks,

Greg


-----Original Message-----
is there any way i can moniter the next cellwhich is
selected ? It occurs inthe midle of a macro and the user
needs to select a cell by clicking on it, and the value
of that is used in the rest of the macro.

this can either be done with a vba macro or a userform
but im guessing the code will all b the same.

Thank you for youre help
.

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

Actually, the Excel inputbox supports the type 8 syntax

Sub SelectRange()
Dim rng As Range
On Error Resume Next
Set rng = Application.InputBox("Select cell with you mouse", Type:=8)
On Error GoTo 0
If rng Is Nothing Then
MsgBox "You clicked cancel; hit OK/enter to exit macro"
Exit Sub
End If
MsgBox "Range selected is " & rng.Address(0, 0, , True)

End Sub


--
Regards,
Tom Ogilvy


"GJones" wrote in message
...
Hi David;

One way is to use a call for an Input Box and then declare
the type to 8. That will force the user to return a range
that you can then use.

Thanks,

Greg


-----Original Message-----
is there any way i can moniter the next cellwhich is
selected ? It occurs inthe midle of a macro and the user
needs to select a cell by clicking on it, and the value
of that is used in the rest of the macro.

this can either be done with a vba macro or a userform
but im guessing the code will all b the same.

Thank you for youre help
.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 71
Default select cell

i'm not very good at these things, but a RefEdit control would work i
think - especially if you need to navigate about the workbook when deciding
which cell needs selecting (which could go onto your userform if you have
one)

"divid wells" wrote in message
...
is there any way i can moniter the next cellwhich is
selected ? It occurs inthe midle of a macro and the user
needs to select a cell by clicking on it, and the value
of that is used in the rest of the macro.

this can either be done with a vba macro or a userform
but im guessing the code will all b the same.

Thank you for youre help



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
VBA: Column Select then Data Select then return to cell A1 James C[_2_] Excel Discussion (Misc queries) 3 February 1st 10 11:35 AM
Using formulas to select cells (Ex: Select every nth cell in a col Lakeview Photographic Services Excel Discussion (Misc queries) 2 March 15th 07 02:17 PM
How to point to (select) a cell to the left from a cell where I enter the = equal sign? Dmitry Excel Discussion (Misc queries) 4 June 30th 06 06:49 AM
I cannot select a single cell or pull down cell contents Carolyn Fahm Excel Worksheet Functions 0 January 24th 06 04:54 PM
Select cell, Copy it, Paste it, Return to Previous cell spydor Excel Discussion (Misc queries) 1 December 30th 05 01:29 PM


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