Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Thelma Murray   on Aug 21 In MS Office Category.

  
Question Answered By: Ujala Hashmi   on Aug 21

To change  the text  of a text box
txtMyTextBox.text="Incorrect"

For a label  use
lblMyLabel.caption="Incorrect"

To make you Next button  work, you need to start off with a variable
Public StartRow as Integer. This should be in the form  declarations area

Then in your Userform initialize code
StartRow = 1

Define the option  buttons as
OptionButton1.Caption = ActiveSheet.Cells(StartRow, 1).Value
OptionButton2.Caption = ActiveSheet.Cells(StartRow+1, 1).Value

Your next button then has an on_click macro which contains
StartRow=StartRow + 5
Me.Parent.Repaint (I think this is right and may be needed to cause the new
options to be displayed)
Then you might want to say
If StartRow>MaxRows then
(Do something because the quiz has been completed)
End If

For hiding sheets you can use

Worksheets("Sheet1").Visible = False

To unhide
Worksheets("Sheet1").Visible = True

Share: 

 

This Question has 3 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on UserForms Or get search suggestion and latest updates.


Tagged: