Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Excel range choose button in VBA form

Hello,
I would like to know if there is a button which can be included in a
userform in Excel 2002 VBA to let people choose a range of cells.

The kind of button (black&white plus a red arrow) which is used in the
graphics part to chosse the data columns of a new graph.

I think I have already seen something similar but can't find it again.

Thanks for your answers
Best regards
Phil
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 156
Default Excel range choose button in VBA form

You can use the inputbox function with option 8 like this:

Dim rngSelection As Range
Set rngSelection = Application.InputBox( _
Prompt:="Please select a range.", _
Type:=8)

this puts a range as the
HTH

Philip

"Philipp" wrote:

Hello,
I would like to know if there is a button which can be included in a
userform in Excel 2002 VBA to let people choose a range of cells.

The kind of button (black&white plus a red arrow) which is used in the
graphics part to chosse the data columns of a new graph.

I think I have already seen something similar but can't find it again.

Thanks for your answers
Best regards
Phil

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 156
Default Excel range choose button in VBA form

You can use the inputbox function with option 8 like this:

Dim rngSelection As Range
Set rngSelection = Application.InputBox( _
Prompt:="Please select a range.", _
Type:=8)

this puts a range as the
HTH

Philip


"Philipp" wrote:

Hello,
I would like to know if there is a button which can be included in a
userform in Excel 2002 VBA to let people choose a range of cells.

The kind of button (black&white plus a red arrow) which is used in the
graphics part to chosse the data columns of a new graph.

I think I have already seen something similar but can't find it again.

Thanks for your answers
Best regards
Phil

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default Excel range choose button in VBA form



you can insert a refedit control from the toolbox.

HOWEVER refedits are very tricky controls.

It will crash excel when used on a modeless form.

You have to be carefull when the refedit is in a "container" on the
form. e.g. a tab, multipage or frame.. events may not be triggered at
the moment you expect it... it will get out of whack if you click a
control outside the container when the refedit has focus.

So for VERY simple modal forms: use a refedit.

ELSE include a button to show the Application.InputBox(Type:=8)
dialogbox to obtain the range.


--






--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Philipp wrote :

Hello,
I would like to know if there is a button which can be included in a
userform in Excel 2002 VBA to let people choose a range of cells.

The kind of button (black&white plus a red arrow) which is used in
the graphics part to chosse the data columns of a new graph.

I think I have already seen something similar but can't find it again.

Thanks for your answers
Best regards
Phil

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default Excel range choose button in VBA form

Hi Phil

Use the RefEdit button

Peter Bircher

"Philipp" wrote in message
...
Hello,
I would like to know if there is a button which can be included in a
userform in Excel 2002 VBA to let people choose a range of cells.

The kind of button (black&white plus a red arrow) which is used in the
graphics part to chosse the data columns of a new graph.

I think I have already seen something similar but can't find it again.

Thanks for your answers
Best regards
Phil





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Excel range choose button in VBA form

Philipp wrote:
Hello,
I would like to know if there is a button which can be included in a
userform in Excel 2002 VBA to let people choose a range of cells.

The kind of button (black&white plus a red arrow) which is used in the
graphics part to chosse the data columns of a new graph.

I think I have already seen something similar but can't find it again.

Thanks for your answers
Best regards
Phil


Thank you for your answers. It works perfect.
Best regards Phil
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 can I choose more than one item from list in a form in Excel? Jolly Excel Worksheet Functions 7 July 14th 08 06:28 PM
how can i choose the highest number in excel range Robert-Alpha Excel Worksheet Functions 4 September 12th 07 07:14 PM
Button in Excel that will save the form? Jason Excel Worksheet Functions 1 October 27th 05 04:55 PM
Transfer data to form from Excel range upon loading of form. Rob Crawford Excel Programming 2 October 24th 05 03:59 PM
Excel VBA User Form - button problem weakissues Excel Programming 1 June 13th 04 05:12 PM


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