ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Userform Rangebutton (https://www.excelbanter.com/excel-discussion-misc-queries/123225-userform-rangebutton.html)

Carlo

Userform Rangebutton
 
Hi All

i want the user to select a range while a userform is open.
There are some built-in Excel-Forms which has this ability,
now i wanted to ask, if this can be reproduced and used
for a Userform!

Thanks for any replies

Carlo

Nick Hodge

Userform Rangebutton
 
Carlo

It's called a refedit control. I placed one on a userform and wrote this
code (In a commandbutton click event) to hide the form and put the refedits
value into cell A1

Private Sub CommandButton1_Click()
Me.Hide
Range("A1").Value = RefEdit1.Value
End Sub

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"Carlo" wrote in message
...
Hi All

i want the user to select a range while a userform is open.
There are some built-in Excel-Forms which has this ability,
now i wanted to ask, if this can be reproduced and used
for a Userform!

Thanks for any replies

Carlo



Carlo

Userform Rangebutton
 
Thanks Nick

it works perfectly

nice Christmas to all of you

Carlo

"Nick Hodge" wrote:

Carlo

It's called a refedit control. I placed one on a userform and wrote this
code (In a commandbutton click event) to hide the form and put the refedits
value into cell A1

Private Sub CommandButton1_Click()
Me.Hide
Range("A1").Value = RefEdit1.Value
End Sub

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"Carlo" wrote in message
...
Hi All

i want the user to select a range while a userform is open.
There are some built-in Excel-Forms which has this ability,
now i wanted to ask, if this can be reproduced and used
for a Userform!

Thanks for any replies

Carlo



Nick Hodge

Userform Rangebutton
 
Your welcome, thank you

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"Carlo" wrote in message
...
Thanks Nick

it works perfectly

nice Christmas to all of you

Carlo

"Nick Hodge" wrote:

Carlo

It's called a refedit control. I placed one on a userform and wrote this
code (In a commandbutton click event) to hide the form and put the
refedits
value into cell A1

Private Sub CommandButton1_Click()
Me.Hide
Range("A1").Value = RefEdit1.Value
End Sub

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"Carlo" wrote in message
...
Hi All

i want the user to select a range while a userform is open.
There are some built-in Excel-Forms which has this ability,
now i wanted to ask, if this can be reproduced and used
for a Userform!

Thanks for any replies

Carlo





All times are GMT +1. The time now is 09:03 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com