LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Selection as String


Hi.

I have created a macro in Excel which have a Form. The form contain
among other things a RefEdit. When I launch the macro this RefEdit i
empty, but I want it to contain for example Sheet1!$F$2:$F$9 as th
default value if these cells are selected in the active sheet.

So what I need to know is if there is a way to get the selecte
range/cell(s) as a string representation.

Pseudo code:
-----------------------------

Code
-------------------

Public Sub MyMacro()
Dim MyRefString As String

' Start of getting Selection as String--
MyRefString = ...
'<-- End of getting Selection as String

With MyForm
.MyRefEdit.Value = MyRefString
End With
...
End Sub

-------------------

-------------------------------

Any ideas?

/Jörge

--
Shakespea
-----------------------------------------------------------------------
Shakespear's Profile: http://www.excelforum.com/member.php...fo&userid=2595
View this thread: http://www.excelforum.com/showthread.php?threadid=39328

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Limiting selection in a cell AND linking that selection to a list Lisa Excel Discussion (Misc queries) 1 July 28th 09 05:00 PM
Change 3 letter text string to a number string Pete Excel Discussion (Misc queries) 3 December 31st 07 07:47 PM
Copy Selection - Transpose Selection - Delete Selection Uninvisible Excel Discussion (Misc queries) 2 October 23rd 07 04:18 PM
to search for a string and affect data if it finds the string? Shwaman Excel Worksheet Functions 1 January 11th 06 12:56 AM
Excel VBA - Range(Selection, Selection.End(xlDown)).Name issue. jonH Excel Programming 3 June 7th 04 09:13 PM


All times are GMT +1. The time now is 12:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"