![]() |
Capture Dynamic Range address into Modeless Form
Hi! I am new here and would like to ask for your assistance regarding m problem. I would like to capture the range address of whatever it is that th user selects on the active worksheet into a textbox in a modeles form. The user just have to set the focus in one of the textboxes the select a range from the worksheet and the range address should b captured inside the textbox. The function is similar to that of getting the List Range or Criteri Range address in the Advanced Filter window of Excel. Hope you could help me out with this. Thanks, Pinin -- pinin ----------------------------------------------------------------------- pining's Profile: http://www.excelforum.com/member.php...fo&userid=1634 View this thread: http://www.excelforum.com/showthread.php?threadid=27729 |
Capture Dynamic Range address into Modeless Form
Hi
use a refedit control for this. This should be in the toolbox then you create a userform) "pining" wrote: Hi! I am new here and would like to ask for your assistance regarding my problem. I would like to capture the range address of whatever it is that the user selects on the active worksheet into a textbox in a modeless form. The user just have to set the focus in one of the textboxes then select a range from the worksheet and the range address should be captured inside the textbox. The function is similar to that of getting the List Range or Criteria Range address in the Advanced Filter window of Excel. Hope you could help me out with this. Thanks, Pining -- pining ------------------------------------------------------------------------ pining's Profile: http://www.excelforum.com/member.php...o&userid=16340 View this thread: http://www.excelforum.com/showthread...hreadid=277294 |
Capture Dynamic Range address into Modeless Form
When the range is selected this way, it because the selection, so just use
Selection.Address or Selection.Address(False, False) if you don't want the $s. Note that this doesn't get the worksheet name as well. Advanced filter actually uses a Reedit control, which does what you want as well, so you might consider using that. But be aware, RefEdikt is flaky, and should NEVER be embedded in a frame. -- HTH RP (remove nothere from the email address if mailing direct) "pining" wrote in message ... Hi! I am new here and would like to ask for your assistance regarding my problem. I would like to capture the range address of whatever it is that the user selects on the active worksheet into a textbox in a modeless form. The user just have to set the focus in one of the textboxes then select a range from the worksheet and the range address should be captured inside the textbox. The function is similar to that of getting the List Range or Criteria Range address in the Advanced Filter window of Excel. Hope you could help me out with this. Thanks, Pining -- pining ------------------------------------------------------------------------ pining's Profile: http://www.excelforum.com/member.php...o&userid=16340 View this thread: http://www.excelforum.com/showthread...hreadid=277294 |
Capture Dynamic Range address into Modeless Form
note:
use Address(External:=True) to get a proper fully qualified string. -- keepITcool | www.XLsupport.com | keepITcool chello nl | amsterdam Bob Phillips wrote in message : When the range is selected this way, it because the selection, so just use Selection.Address or Selection.Address(False, False) if you don't want the $s. Note that this doesn't get the worksheet name as well. |
All times are GMT +1. The time now is 12:19 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com