Jump to content
xisto Community

Dragonblight

Members
  • Content Count

    1
  • Joined

  • Last visited

Posts posted by Dragonblight


  1. where is my mistake?

     

    Visual Basic Help

    I'm trying to complete this code and I'm getting the code from the book.

    The code is: Private Sub Form_Load()

    ' Initialize the label's text

    Dim strLabel1 As String

    Dim strLabel2 As String

    Dim StrLabel3 As String

    Dim StrLabel4 As String

     

    StrLabel1 = "use frames if you want"

    StrLabel2 = " to group options together"

    StrLabel3 = " Each frame forms one set"

    StrLabel4 = " of option buttons"

     

    LblFrames.Caption= strLabel1&strLabel2&strLabel3&strLabel4

     

    End Sub

     

    Now the problem is with the last line , it didn't accept the ampersand after every string name . If you can help with that , please reply. Thank you

     

    -question by new student


    The solution is very simple, just add spaces between the string names and the & signs, like this:

     

    LblFrames.Caption = strLabel1 & strLabel2 & strLabel3 & strLabel4

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.