PC Review


Reply
Thread Tools Rate Thread

How do I create a string from a range (Excel VBA)?

 
 
=?Utf-8?B?Sko=?=
Guest
Posts: n/a
 
      13th Nov 2007
I want to create a userform that can string a selected range of cells to a
textbox. I can do it on predifend cells, but I want it to be flexible so
that you can highlight the cells and then click a button that will string it.
Can anybody help me with a link to a page that explain how to string from
highlighted cells?
 
Reply With Quote
 
 
 
 
Bob Phillips
Guest
Posts: n/a
 
      13th Nov 2007
Dim rng As Range
Dim cell As Range
Dim str

Set rng = Application.InputBox("Use mo=use to select cells", Type:=8)
For Each cell In rng
str = str & cell.Value & " "
Next cell
TextBox1.Text = str


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"JJ" <(E-Mail Removed)> wrote in message
news:0E05FF67-0986-4672-BC18-(E-Mail Removed)...
>I want to create a userform that can string a selected range of cells to a
> textbox. I can do it on predifend cells, but I want it to be flexible so
> that you can highlight the cells and then click a button that will string
> it.
> Can anybody help me with a link to a page that explain how to string from
> highlighted cells?



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting Excel Range Data and Saving as a String LT Microsoft Access VBA Modules 1 12th Nov 2008 06:21 PM
Create comma-delimited string from dynamic range? Ptyrider Microsoft Excel Misc 2 26th Nov 2007 09:04 AM
making a text string recognizable as a name range in excel cheloco Microsoft Excel Programming 1 27th Jan 2007 12:15 AM
Excel / Formatting a Cell / Setting a string range shumwaymeister@gmail.com Microsoft Excel Programming 1 24th Oct 2006 05:53 AM
Possible to create a range string for a worksheet function? Android Microsoft Excel Worksheet Functions 5 4th Jun 2004 04:44 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:53 AM.