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: 3
Default set control toolbox- optionbuttons

Hi,



I want to set some (control toolbox-) Optionbuttons in a worksheet to
"True".

I retrieve the names of which Optionbuttons I want to set from another
sheet, and put those names into an array of Strings.



Finaly, can I loop the array and do a conversion from String to
Optionbutton, and set them one by one to "True"?

Here's my code so far:



Public Sub TestNVTlist()

Dim row, column As Integer

Dim NVTlist() As String

Dim NVT As String



row = 2

column = 2



NVT = Trim(Sheet6.Cells(row, column).Value)

Do While NVT < ""

NVT = Trim(Sheet6.Cells(row, column).Value)

ReDim Preserve NVTlist(column - 1)

NVTlist(column - 1) = NVT

column = column + 1

Loop



Dim i As Integer

Dim myStr As String



For i = 1 To UBound(NVTlist) - 1

myStr = "Optionbutton" & Replace(NVTlist(i), ".", "_", , ,
vbTextCompare) & "_NVT"



' HERE I WANT TO DO A CONVERSION FROM "myStr" TO
OPTIONBUTTON AND SET THE VALUE TO TRUE <<<



Next

End Sub



Thx.

Ludwig DV

Kaprijke, Belgium

 
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
Control ToolBox OptionButtons? Ken Excel Discussion (Misc queries) 8 May 23rd 07 04:22 PM
Control ToolBox OptionButtons Printing? Ken Excel Discussion (Misc queries) 3 May 23rd 07 12:47 PM
reset control toolbox optionbuttons [email protected] Excel Programming 2 October 24th 06 11:33 AM
Problem: Control Toolbox Control resizes when clicked Ed Excel Programming 1 July 27th 05 07:55 AM
Controls Toolbox control vs Form Toolbox control Tony_VBACoder Excel Programming 3 January 28th 05 08:30 AM


All times are GMT +1. The time now is 07:19 AM.

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"