Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 313
Default User Form Question

I have a section of my program that will display a different user form
depending on what a given input was (NT1s). I know that following will work
to display the correct form but I was wondering if there was a way to use the
variable "NT1s" in a single line to show the correct form. Something like
ModConfig(NT1).Show

As always, any help is greatly appreciated!

If NT1s = 1 Then
ModConfig1.Show
End If
If NT1s = 2 Then
ModConfig2.Show
End If
If NT1s = 3 Then
ModConfig3.Show
End If
If NT1s = 4 Then
ModConfig4.Show
End If
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 205
Default User Form Question

Hi Tony,

Something like
ModConfig(NT1).Show

As always, any help is greatly appreciated!

If NT1s = 1 Then
ModConfig1.Show
End If
If NT1s = 2 Then
ModConfig2.Show
End If
If NT1s = 3 Then
ModConfig3.Show
End If
If NT1s = 4 Then
ModConfig4.Show
End If


Su

VBA.Userforms("ModConfig" & NT1s).Show

Regards

Stephen Bullen
Microsoft MVP - Excel
www.oaltd.co.uk


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
User Form question ah Excel Discussion (Misc queries) 1 November 5th 07 10:40 AM
User form question nath Excel Programming 1 May 20th 04 04:41 AM
User Form Question Ray Batig Excel Programming 2 January 17th 04 03:28 PM
User form question Haas[_2_] Excel Programming 4 November 27th 03 10:25 AM
User form question Gareth[_3_] Excel Programming 2 November 20th 03 09:37 PM


All times are GMT +1. The time now is 03:15 AM.

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"