Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Dynamically Hiding portions of a UserForm


I have a user form with 12 frames, each representing a "row." The user
form gets the total number of rows (a number between 1 and 12). Each
frame is named "Row?Frame", where the question mark is a number between
1 and 12. The user form is named DefineRowsUserForm. I want to hide
all the rows that are not needed. For example, to hide row 3:

DefineRowsUserForm.Row3Frame


I want to automate this to hide the uneeded rows based on the total
number of rows. I tried to do this as follows:

Dim RowEraseLabel As String
'Get the number of rows
NumRows = Val(ConnUserForm.NumPinsTextBox.Value)
'Hide unnecessary rows
For i = NumRows + 1 To 12 Step 1 'count over pins in each row
RowEraseLabel = "DefineRowsUserForm.Row" & i & "Frame"
RowEraseLabel.Visible = False
Next i

The above code does not work, but only shows the idea of what I want to
do. If anyone knows a slick way to do this, please help.


--
fly_fish_boy
------------------------------------------------------------------------
fly_fish_boy's Profile: http://www.excelforum.com/member.php...o&userid=32456
View this thread: http://www.excelforum.com/showthread...hreadid=522292

Reply
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
Dynamically create userform michael v Excel Programming 0 February 13th 06 07:56 PM
Problem with Blocking Dynamically generated UserForm Call vmegha Excel Programming 4 December 21st 05 12:39 PM
How can I create and display a chart dynamically on a UserForm wi. cc Charts and Charting in Excel 1 February 14th 05 02:44 PM
dynamically create userform Janelle Excel Programming 7 December 17th 04 04:47 PM
How to create labels in a UserForm dynamically and be able to resize them with the mouse. Pierre Archambault Excel Programming 0 November 23rd 04 08:39 PM


All times are GMT +1. The time now is 04:59 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"