Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Prompting a Cell Selection Dialog Box

Hello Everyone:

I am emailing this question from work, so I apologize I did not have the
opportunity to do a through search for answer through the forum. I did a
quick one but did not find my answer and thus this post. Thanks in advance
for any assistance.

I am writing a VBA macro in which I would like to have a cell selection
dialog to pop up for the user. I do not know if this is the correct name for
what I am looking for, but you can see this when you use the Function Wizard
in Excel or when you make a PivotTable and Excel prompts you for data range.
Any quick leads would be all I need. It usually looks like a Text Box
control with a little button at the right side which when you click it you
can navigate the spreadsheet to select your cell or range or cells.

Any leads would be great or even a listing of the method on an object to
generate this box (if possible) would be great. Again, thanks in advance.

Amar
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Prompting a Cell Selection Dialog Box

Hi
- create a userform
- use a refEdit control for allowing cell selection (VBA's help should
provide more infos about this control)

This control can be found in the toolbox toolbar

--
Regards
Frank Kabel
Frankfurt, Germany

"Amar Kapadia" schrieb im Newsbeitrag
...
Hello Everyone:

I am emailing this question from work, so I apologize I did not have

the
opportunity to do a through search for answer through the forum. I

did a
quick one but did not find my answer and thus this post. Thanks in

advance
for any assistance.

I am writing a VBA macro in which I would like to have a cell

selection
dialog to pop up for the user. I do not know if this is the correct

name for
what I am looking for, but you can see this when you use the Function

Wizard
in Excel or when you make a PivotTable and Excel prompts you for data

range.
Any quick leads would be all I need. It usually looks like a Text

Box
control with a little button at the right side which when you click

it you
can navigate the spreadsheet to select your cell or range or cells.

Any leads would be great or even a listing of the method on an object

to
generate this box (if possible) would be great. Again, thanks in

advance.

Amar


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Prompting a Cell Selection Dialog Box

Frank,
Thanks..excellent lead. I will experiment with this control which I
honestly never knew existed in my control toolbox until your post. Anyway,
thanks.

"Frank Kabel" wrote:

Hi
- create a userform
- use a refEdit control for allowing cell selection (VBA's help should
provide more infos about this control)

This control can be found in the toolbox toolbar

--
Regards
Frank Kabel
Frankfurt, Germany

"Amar Kapadia" schrieb im Newsbeitrag
...
Hello Everyone:

I am emailing this question from work, so I apologize I did not have

the
opportunity to do a through search for answer through the forum. I

did a
quick one but did not find my answer and thus this post. Thanks in

advance
for any assistance.

I am writing a VBA macro in which I would like to have a cell

selection
dialog to pop up for the user. I do not know if this is the correct

name for
what I am looking for, but you can see this when you use the Function

Wizard
in Excel or when you make a PivotTable and Excel prompts you for data

range.
Any quick leads would be all I need. It usually looks like a Text

Box
control with a little button at the right side which when you click

it you
can navigate the spreadsheet to select your cell or range or cells.

Any leads would be great or even a listing of the method on an object

to
generate this box (if possible) would be great. Again, thanks in

advance.

Amar



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Prompting a Cell Selection Dialog Box

A quick and dirty way to get a range is to use application.inputbox:


sub testme()

dim myRng as range
set myrng = nothing
on error resume next
set myrng = application.inputbox(prompt:="hi there!",type:=8)
on error goto 0

if myrng is nothing then
'user hit cancel
else
'you have a range
end if

End sub

Amar Kapadia wrote:

Hello Everyone:

I am emailing this question from work, so I apologize I did not have the
opportunity to do a through search for answer through the forum. I did a
quick one but did not find my answer and thus this post. Thanks in advance
for any assistance.

I am writing a VBA macro in which I would like to have a cell selection
dialog to pop up for the user. I do not know if this is the correct name for
what I am looking for, but you can see this when you use the Function Wizard
in Excel or when you make a PivotTable and Excel prompts you for data range.
Any quick leads would be all I need. It usually looks like a Text Box
control with a little button at the right side which when you click it you
can navigate the spreadsheet to select your cell or range or cells.

Any leads would be great or even a listing of the method on an object to
generate this box (if possible) would be great. Again, thanks in advance.

Amar


--

Dave Peterson

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Prompting a Cell Selection Dialog Box

Dave,

Thank you so much. I have the code now in my Personal.xls to experiment and
learn from. I never knew this even existed in the InputBox method. Amazing.
Anyway, I'll use your and Frank's leads and figure out the best method for
my application. Thanks again for the lead and the code.

"Dave Peterson" wrote:

A quick and dirty way to get a range is to use application.inputbox:


sub testme()

dim myRng as range
set myrng = nothing
on error resume next
set myrng = application.inputbox(prompt:="hi there!",type:=8)
on error goto 0

if myrng is nothing then
'user hit cancel
else
'you have a range
end if

End sub

Amar Kapadia wrote:

Hello Everyone:

I am emailing this question from work, so I apologize I did not have the
opportunity to do a through search for answer through the forum. I did a
quick one but did not find my answer and thus this post. Thanks in advance
for any assistance.

I am writing a VBA macro in which I would like to have a cell selection
dialog to pop up for the user. I do not know if this is the correct name for
what I am looking for, but you can see this when you use the Function Wizard
in Excel or when you make a PivotTable and Excel prompts you for data range.
Any quick leads would be all I need. It usually looks like a Text Box
control with a little button at the right side which when you click it you
can navigate the spreadsheet to select your cell or range or cells.

Any leads would be great or even a listing of the method on an object to
generate this box (if possible) would be great. Again, thanks in advance.

Amar


--

Dave Peterson




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Prompting a Cell Selection Dialog Box

There is a difference between application.inputbox and plain old inputbox.

Type:=# is only available in application.inputbox().



Amar Kapadia wrote:

Dave,

Thank you so much. I have the code now in my Personal.xls to experiment and
learn from. I never knew this even existed in the InputBox method. Amazing.
Anyway, I'll use your and Frank's leads and figure out the best method for
my application. Thanks again for the lead and the code.

"Dave Peterson" wrote:

A quick and dirty way to get a range is to use application.inputbox:


sub testme()

dim myRng as range
set myrng = nothing
on error resume next
set myrng = application.inputbox(prompt:="hi there!",type:=8)
on error goto 0

if myrng is nothing then
'user hit cancel
else
'you have a range
end if

End sub

Amar Kapadia wrote:

Hello Everyone:

I am emailing this question from work, so I apologize I did not have the
opportunity to do a through search for answer through the forum. I did a
quick one but did not find my answer and thus this post. Thanks in advance
for any assistance.

I am writing a VBA macro in which I would like to have a cell selection
dialog to pop up for the user. I do not know if this is the correct name for
what I am looking for, but you can see this when you use the Function Wizard
in Excel or when you make a PivotTable and Excel prompts you for data range.
Any quick leads would be all I need. It usually looks like a Text Box
control with a little button at the right side which when you click it you
can navigate the spreadsheet to select your cell or range or cells.

Any leads would be great or even a listing of the method on an object to
generate this box (if possible) would be great. Again, thanks in advance.

Amar


--

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
dialog box selection type ORLANDO VAZQUEZ[_2_] Excel Discussion (Misc queries) 1 September 30th 09 08:24 PM
How do you do a range selection dialog like those many in Excel? LunaMoon Excel Discussion (Misc queries) 2 July 31st 08 04:22 PM
Print dialog box selection macro I think I need to rephrase the question Excel Discussion (Misc queries) 2 November 4th 07 11:31 PM
how change selection when msgbox dialog box on screen? Ian Elliott[_2_] Excel Programming 1 September 9th 03 01:47 PM
Dialog Box Confirmation Selection Annie[_2_] Excel Programming 1 August 24th 03 02:49 PM


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