Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Aug 2001
    Posts
    66
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Displaying Strings (2000)

    Hello all, if any of you are familiar with C++'s "cout", you can combine variables and hard-typed strings/integers into a string, in C++.

    ex:
    cout << "Hello" << name << "How are you doing on this fine" << dayofweek

    In Excel, I need a messagebox to have variable prompt text. this is what i have now:

    TempRank = InputBox("Please rank" CurrentStudentFN CurrentStudentLN "for" CurrentAgency", Title:=CurrentAgency)

    Also, is it possible to make the only variables appear in BOLD?
    How can I make somethinglike this work? thanks in advance.

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Displaying Strings (2000)

    In VB/VBA you can combine variables and hardcode strings by using the concatenate operator, &.

    You example would look like this :

    TempRank = InputBox("Please rank " & CurrentStudentFN & CurrentStudentLN & "for " & CurrentAgency", Title:=CurrentAgency).

    If you want to use bold, I think you will have to use a userform, where you setup different labels and set the font properties as required.

    Andrew C

  3. #3
    Star Lounger
    Join Date
    Aug 2001
    Posts
    66
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Displaying Strings (2000)

    Andrew, THANKS A MILLION.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •