Results 1 to 5 of 5

Thread: Linefeed on a button?

  1. #1

    Thread Starter
    Fanatic Member coox's Avatar
    Join Date
    Oct 1999
    Posts
    550
    Anyone know if VB6 can do this? With VBA you can, at design-time, press ctrl+enter and a linefeed is entered into the caption of your button. Anyone?

  2. #2
    Lively Member
    Join Date
    Jan 2000
    Location
    Springfield, IL
    Posts
    124
    I did not get it to work at design time, but it will at run time. all you need to do is set the caption property of the command button to "TEXT" & vbcrlf & "MORE TEXT".

  3. #3
    Fanatic Member
    Join Date
    Mar 2000
    Location
    That posh bit of England known as Buckinghamshire
    Posts
    658

    Re : LineFeed

    I don't think you can do it at design time. but at run time you can use : chr(13)


    Give This a go

    Code:
    command1.caption = chr(13) & "Hello"
    Or do what matey above says, as while i was typing this he posted one. DOH!

    [Edited by Iain17 on 03-28-2000 at 10:23 AM]

  4. #4
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    No I don't think so!

    you can insert vbcrlf at run time though

    Code:
    Private Sub Form_Load()
    Command1.Caption = "Line1" & vbCrLf & "line2" & vbCrLf & "line3"
    End Sub
    Mark
    -------------------

  5. #5

    Thread Starter
    Fanatic Member coox's Avatar
    Join Date
    Oct 1999
    Posts
    550
    Thanks chaps! Shame about the desing time thing...

Posting Permissions

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



Click Here to Expand Forum to Full Width