Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old January 16th, 2006, 05:58 AM
FrankyB FrankyB is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jan 2006
Posts: 1 FrankyB User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 14 m 2 sec
Reputation Power: 0
Unhappy Variable Label name

Basically my problem is I have a spreadsheet with a load of questions in it, and I have a form with lots of captions. When the form loads I want the captions of the labels to correspond with the questions.
Because im lazy im trying to do it the easy way by having them all numbered so I can just increment the number by 1 to represent a new label caption

Code:
Private Sub UserForm_Initialize()
Dim intValue
Dim Question
Dim strQuestion
For intValue = 1 To 27
    Question = "Question" & intValue & ".Caption"
    MsgBox Question
    strQuestion = Cells(intValue + 3, "S").Value
    MsgBox strQuestion
    Question = strQuestion
    MsgBox Question
Next

End Sub


Thats what I have so far but it doesnt like the way im representing the label.caption
Any help would be greatly appreciated!
N.B. I stuck in a couple of msgBox's to test the outcomes of things

Frank

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingVisual Basic Programming > Variable Label name


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT