end down option in a textbox of a form

D

DTGvet

I have an excel form that reguires the user to enter a range of cel
(variable in length) -- I would like them to be able to use th
end-down key combination when using the form.

the code below when run in a macro works-allowing the end down ke
combination.

Set mydur = Application.InputBox(prompt:="Select duration data"
Title:="Duration", Type:=8)

but when the same code is placed in code for a form -- it will no
allow the end down key combination to be used???

thanks,
DTGve
 
A

Ardus Petus

'-------------------------------------
Sub tester()
Dim MyDur As Range

Set MyDur = Application.InputBox( _
prompt:="Select duration data", _
Title:="Duration", _
Type:=8 _
).End(xlDown)
End Sub
'------------------------------------------

HTH
 
Top