Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can I choose more than one item from list in a form in Excel? | Excel Worksheet Functions | |||
how can i choose the highest number in excel range | Excel Worksheet Functions | |||
Button in Excel that will save the form? | Excel Worksheet Functions | |||
Transfer data to form from Excel range upon loading of form. | Excel Programming | |||
Excel VBA User Form - button problem | Excel Programming |