ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   end down option in a textbox of a form (https://www.excelbanter.com/excel-discussion-misc-queries/94141-end-down-option-textbox-form.html)

DTGvet

end down option in a textbox of a form
 

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

the code below when run in a macro works-allowing the end down key
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 not
allow the end down key combination to be used???

thanks,
DTGvet


--
DTGvet
------------------------------------------------------------------------
DTGvet's Profile: http://www.excelforum.com/member.php...o&userid=35445
View this thread: http://www.excelforum.com/showthread...hreadid=552222


Ardus Petus

end down option in a textbox of a form
 
'-------------------------------------
Sub tester()
Dim MyDur As Range

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

HTH
--
AP

"DTGvet" a écrit dans
le message de news: ...

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

the code below when run in a macro works-allowing the end down key
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 not
allow the end down key combination to be used???

thanks,
DTGvet


--
DTGvet
------------------------------------------------------------------------
DTGvet's Profile:
http://www.excelforum.com/member.php...o&userid=35445
View this thread: http://www.excelforum.com/showthread...hreadid=552222





All times are GMT +1. The time now is 11:31 AM.

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