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: 27,285
Default Values in a MultiColumn Listbox

Dim sh as Worksheet
Dim i as Long
Dim sName as String

varr = Userform1.ListBox1.List
for i = lbound(varr,1) to Ubound(varr,1)
On Error Resume Next
set sh = Worksheets(varr(i,lbound(varr,2))
On Error goto 0
if not sh is nothing then
sName = Trim(varr(i,lbound(varr,2)+1))
sh.Name = sName
end if
Next

--
Regards,
Tom Ogilvy

"Stuart" wrote in message
...
I have a multicolumn listbox (2 cols). Col1 has values
A, B C etc that represent actual sheetnames in the
activeworkbook.
Against each of these values, the user has typed into
a textbox on the form, their true sheetnames. So the
listbox might look like
A Test1
B Test5
etc.

How may I now rename the sheets with the user's
true sheetnames, please?

Regards.



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003




 
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
multicolumn adress file. want to sort on last , first name bdcochran New Users to Excel 5 May 29th 09 06:47 PM
Listbox Values Richard Excel Discussion (Misc queries) 3 July 29th 08 12:22 AM
Transferring items between multicolumn listboxes [email protected] Excel Discussion (Misc queries) 2 September 28th 07 03:09 PM
ListBox with Horizontal Values Scott Halper Excel Worksheet Functions 1 March 27th 07 12:20 AM
Sorting ListBox results or transposing ListBox values to other cells for sorting Rob[_8_] Excel Programming 1 July 9th 03 04:35 AM


All times are GMT +1. The time now is 08:35 PM.

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

About Us

"It's about Microsoft Excel"