ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Arguments box on form (https://www.excelbanter.com/excel-discussion-misc-queries/64664-arguments-box-form.html)

Greshter

Arguments box on form
 
Hi All

I'd like to know how you can have an arguments box on a form. I need to
select a cell range directly from a spreadsheet and would like to see
them preferably entered in a text box on a form like you get when you
create formulas with the function arguments box. If anybody has got any
ideas I would like to hear them.

Cheers,
Mike


Dave Peterson

Arguments box on form
 
Like with a macro?

Option Explicit
sub testme()
dim myRng as range
set myrng = nothing
on error resume next
set myrng = application.inputbox(prompt:="Select a range with the mouse", _
type:=8)
on error goto 0

if myrng is nothing then
'use hit cancel
exit sub '???
end if

'do something with the range
msgbox myrng.address(external:=true)
end sub



Greshter wrote:

Hi All

I'd like to know how you can have an arguments box on a form. I need to
select a cell range directly from a spreadsheet and would like to see
them preferably entered in a text box on a form like you get when you
create formulas with the function arguments box. If anybody has got any
ideas I would like to hear them.

Cheers,
Mike


--

Dave Peterson

Greshter

Arguments box on form
 
Again Dave that's just what I'm after ... I'll have to start sending
you a cut of my wages.

Cheers,
Mike


Dave Peterson

Arguments box on form
 
Woohoo!!!

I'm in the money!

Greshter wrote:

Again Dave that's just what I'm after ... I'll have to start sending
you a cut of my wages.

Cheers,
Mike


--

Dave Peterson


All times are GMT +1. The time now is 02:14 AM.

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