Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
CLR CLR is offline
external usenet poster
 
Posts: 594
Default How to get user to select cell

Hi all.........

I would like to select a sheet (no problem there),............ then I would
like a msgbox to pop up telling the user to select a cell (no problem
there),.......... then I would like for the macro to pause until the user to
selects a cell.......and then for the macro to continue to run using that
cell as the selection.

TIA
Vaya con Dios,
Chuck, CABGx3




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default How to get user to select cell

hi
you could use a input box instead and have them enter the cell address.

Dim stg As String
stg = InputBox("enter cell address")
MsgBox stg 'for test only
Range(stg).Select 'for test only

regards
FSt1

"CLR" wrote:

Hi all.........

I would like to select a sheet (no problem there),............ then I would
like a msgbox to pop up telling the user to select a cell (no problem
there),.......... then I would like for the macro to pause until the user to
selects a cell.......and then for the macro to continue to run using that
cell as the selection.

TIA
Vaya con Dios,
Chuck, CABGx3





  #3   Report Post  
Posted to microsoft.public.excel.programming
CLR CLR is offline
external usenet poster
 
Posts: 594
Default How to get user to select cell

Thank you, but no.......in this instance I want the user to select a
cell........

Vaya con Dios,
Chuck, CABGx3




"FSt1" wrote in message
...
hi
you could use a input box instead and have them enter the cell address.

Dim stg As String
stg = InputBox("enter cell address")
MsgBox stg 'for test only
Range(stg).Select 'for test only

regards
FSt1

"CLR" wrote:

Hi all.........

I would like to select a sheet (no problem there),............ then I

would
like a msgbox to pop up telling the user to select a cell (no problem
there),.......... then I would like for the macro to pause until the

user to
selects a cell.......and then for the macro to continue to run using

that
cell as the selection.

TIA
Vaya con Dios,
Chuck, CABGx3







  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default How to get user to select cell

Dim myCell as range
set mycell = nothing
on error resume next 'cancel will cause an error
set mycell = application.inputbox(Prompt:="select a cell", type:=8).cells(1)
on error goto 0

if mycell is nothing then
msgbox "You didn't select a cell!"
else
msgbox "You selected: " & mycell.address(external:=true)
end if



CLR wrote:

Hi all.........

I would like to select a sheet (no problem there),............ then I would
like a msgbox to pop up telling the user to select a cell (no problem
there),.......... then I would like for the macro to pause until the user to
selects a cell.......and then for the macro to continue to run using that
cell as the selection.

TIA
Vaya con Dios,
Chuck, CABGx3


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.programming
CLR CLR is offline
external usenet poster
 
Posts: 594
Default How to get user to select cell

Got it Dave, and it does me fine...........thank you most kindly.......

BTW.......what does the Type:=8 mean, and are there other choices?

Vaya con Dios,
Chuck, CABGx3



"Dave Peterson" wrote in message
...
Dim myCell as range
set mycell = nothing
on error resume next 'cancel will cause an error
set mycell = application.inputbox(Prompt:="select a cell",

type:=8).cells(1)
on error goto 0

if mycell is nothing then
msgbox "You didn't select a cell!"
else
msgbox "You selected: " & mycell.address(external:=true)
end if



CLR wrote:

Hi all.........

I would like to select a sheet (no problem there),............ then I

would
like a msgbox to pop up telling the user to select a cell (no problem
there),.......... then I would like for the macro to pause until the

user to
selects a cell.......and then for the macro to continue to run using

that
cell as the selection.

TIA
Vaya con Dios,
Chuck, CABGx3


--

Dave Peterson





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default How to get user to select cell

I hope that there are other choices--or what the heck was MS thinking when
starting with type:=8. <vbg

Type:=8 means that you want to return a range.

If you search VBA's help for inputbox method (not inputbox function), you'll
see:

Type Optional Variant. Specifies the return data type. If this argument is
omitted, the dialog box returns text. Can be one or a sum of the following
values.

Value Meaning
0 A formula
1 A number
2 Text (a string)
4 A logical value (True or False)
8 A cell reference, as a Range object
16 An error value, such as #N/A
64 An array of values

You can use the sum of the allowable values for Type. For example, for an input
box that can accept both text and numbers, set Type to 1 + 2.




CLR wrote:

Got it Dave, and it does me fine...........thank you most kindly.......

BTW.......what does the Type:=8 mean, and are there other choices?

Vaya con Dios,
Chuck, CABGx3

"Dave Peterson" wrote in message
...
Dim myCell as range
set mycell = nothing
on error resume next 'cancel will cause an error
set mycell = application.inputbox(Prompt:="select a cell",

type:=8).cells(1)
on error goto 0

if mycell is nothing then
msgbox "You didn't select a cell!"
else
msgbox "You selected: " & mycell.address(external:=true)
end if



CLR wrote:

Hi all.........

I would like to select a sheet (no problem there),............ then I

would
like a msgbox to pop up telling the user to select a cell (no problem
there),.......... then I would like for the macro to pause until the

user to
selects a cell.......and then for the macro to continue to run using

that
cell as the selection.

TIA
Vaya con Dios,
Chuck, CABGx3


--

Dave Peterson


--

Dave Peterson
  #7   Report Post  
Posted to microsoft.public.excel.programming
CLR CLR is offline
external usenet poster
 
Posts: 594
Default How to get user to select cell

I guess that's why you get the Big Bucks, Dave <g

Thanks most kindly,
Vaya con Dios,
Chuck, CABGx3



"Dave Peterson" wrote in message
...
I hope that there are other choices--or what the heck was MS thinking when
starting with type:=8. <vbg

Type:=8 means that you want to return a range.

If you search VBA's help for inputbox method (not inputbox function),

you'll
see:

Type Optional Variant. Specifies the return data type. If this argument

is
omitted, the dialog box returns text. Can be one or a sum of the following
values.

Value Meaning
0 A formula
1 A number
2 Text (a string)
4 A logical value (True or False)
8 A cell reference, as a Range object
16 An error value, such as #N/A
64 An array of values

You can use the sum of the allowable values for Type. For example, for an

input
box that can accept both text and numbers, set Type to 1 + 2.




CLR wrote:

Got it Dave, and it does me fine...........thank you most kindly.......

BTW.......what does the Type:=8 mean, and are there other choices?

Vaya con Dios,
Chuck, CABGx3

"Dave Peterson" wrote in message
...
Dim myCell as range
set mycell = nothing
on error resume next 'cancel will cause an error
set mycell = application.inputbox(Prompt:="select a cell",

type:=8).cells(1)
on error goto 0

if mycell is nothing then
msgbox "You didn't select a cell!"
else
msgbox "You selected: " & mycell.address(external:=true)
end if



CLR wrote:

Hi all.........

I would like to select a sheet (no problem there),............ then

I
would
like a msgbox to pop up telling the user to select a cell (no

problem
there),.......... then I would like for the macro to pause until the

user to
selects a cell.......and then for the macro to continue to run using

that
cell as the selection.

TIA
Vaya con Dios,
Chuck, CABGx3

--

Dave Peterson


--

Dave Peterson



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default How to get user to select cell

When BillG, WarrenB and go out, I always pick up the tab!



CLR wrote:

I guess that's why you get the Big Bucks, Dave <g

Thanks most kindly,
Vaya con Dios,
Chuck, CABGx3

"Dave Peterson" wrote in message
...
I hope that there are other choices--or what the heck was MS thinking when
starting with type:=8. <vbg

Type:=8 means that you want to return a range.

If you search VBA's help for inputbox method (not inputbox function),

you'll
see:

Type Optional Variant. Specifies the return data type. If this argument

is
omitted, the dialog box returns text. Can be one or a sum of the following
values.

Value Meaning
0 A formula
1 A number
2 Text (a string)
4 A logical value (True or False)
8 A cell reference, as a Range object
16 An error value, such as #N/A
64 An array of values

You can use the sum of the allowable values for Type. For example, for an

input
box that can accept both text and numbers, set Type to 1 + 2.




CLR wrote:

Got it Dave, and it does me fine...........thank you most kindly.......

BTW.......what does the Type:=8 mean, and are there other choices?

Vaya con Dios,
Chuck, CABGx3

"Dave Peterson" wrote in message
...
Dim myCell as range
set mycell = nothing
on error resume next 'cancel will cause an error
set mycell = application.inputbox(Prompt:="select a cell",
type:=8).cells(1)
on error goto 0

if mycell is nothing then
msgbox "You didn't select a cell!"
else
msgbox "You selected: " & mycell.address(external:=true)
end if



CLR wrote:

Hi all.........

I would like to select a sheet (no problem there),............ then

I
would
like a msgbox to pop up telling the user to select a cell (no

problem
there),.......... then I would like for the macro to pause until the
user to
selects a cell.......and then for the macro to continue to run using
that
cell as the selection.

TIA
Vaya con Dios,
Chuck, CABGx3

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson
  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default How to get user to select cell

Something ate my I.

Ouch!!!!!!!!

Dave Peterson wrote:

When BillG, WarrenB and go out, I always pick up the tab!

CLR wrote:

I guess that's why you get the Big Bucks, Dave <g

Thanks most kindly,
Vaya con Dios,
Chuck, CABGx3

"Dave Peterson" wrote in message
...
I hope that there are other choices--or what the heck was MS thinking when
starting with type:=8. <vbg

Type:=8 means that you want to return a range.

If you search VBA's help for inputbox method (not inputbox function),

you'll
see:

Type Optional Variant. Specifies the return data type. If this argument

is
omitted, the dialog box returns text. Can be one or a sum of the following
values.

Value Meaning
0 A formula
1 A number
2 Text (a string)
4 A logical value (True or False)
8 A cell reference, as a Range object
16 An error value, such as #N/A
64 An array of values

You can use the sum of the allowable values for Type. For example, for an

input
box that can accept both text and numbers, set Type to 1 + 2.




CLR wrote:

Got it Dave, and it does me fine...........thank you most kindly.......

BTW.......what does the Type:=8 mean, and are there other choices?

Vaya con Dios,
Chuck, CABGx3

"Dave Peterson" wrote in message
...
Dim myCell as range
set mycell = nothing
on error resume next 'cancel will cause an error
set mycell = application.inputbox(Prompt:="select a cell",
type:=8).cells(1)
on error goto 0

if mycell is nothing then
msgbox "You didn't select a cell!"
else
msgbox "You selected: " & mycell.address(external:=true)
end if



CLR wrote:

Hi all.........

I would like to select a sheet (no problem there),............ then

I
would
like a msgbox to pop up telling the user to select a cell (no

problem
there),.......... then I would like for the macro to pause until the
user to
selects a cell.......and then for the macro to continue to run using
that
cell as the selection.

TIA
Vaya con Dios,
Chuck, CABGx3

--

Dave Peterson

--

Dave Peterson


--

Dave Peterson


--

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
Prompt user to select a printer using a checkbox within a user Tom Ogilvy Excel Programming 0 January 10th 07 03:57 AM
how do I prompt the user to select a cell? [email protected] Excel Programming 1 December 19th 06 11:42 PM
Allowing user to select a cell in another workbook in VBA Stephen[_23_] Excel Programming 1 September 12th 06 12:02 AM
Not allow user to select a locked cell CoolCyber Excel Programming 2 November 14th 05 05:00 AM
User select row? rudini Excel Programming 3 September 9th 05 02:42 PM


All times are GMT +1. The time now is 04:22 AM.

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"