Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 166
Default Assigning control tip text


Can you add a linefeed programicably?

I'm finding chr$(13) and vblf etc. just print a square in the text.

Thanks - Kirk
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Assigning control tip text

It can only be one line long.
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Assigning control tip text


vbLf should work fine.

Code:
--------------------
Sub Test()
Selection.Value = "Did it " & vbLf & "work?"
End Sub

--------------------


--
Oorang
------------------------------------------------------------------------
Oorang's Profile: http://www.thecodecage.com/forumz/member.php?userid=129
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=64545

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Assigning control tip text


Don't use the string $, you can use a number of ways
Code:
--------------------
MsgBox "This is a" & vbLf & "test for" & Chr(10) & "adding new" & vbNewLine & "Lines!"

--------------------
each of the new line commands can be used on thier own or mixed as
seen, but best practice would dictate that you stick with one!

kirkm;231004 Wrote:
Can you add a linefeed programicably?

I'm finding chr$(13) and vblf etc. just print a square in the text.

Thanks - Kirk



--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.thecodecage.com/forumz/member.php?userid=1
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=64545

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 166
Default Assigning control tip text

On Sat, 14 Feb 2009 20:27:01 -0800, Kenneth Hobson
wrote:

It can only be one line long.


Thanks... so be it !

Cheers - Kirk


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 166
Default Assigning control tip text

On Sun, 15 Feb 2009 05:42:36 +0000, Oorang
wrote:


vbLf should work fine.

Code:
--------------------
Sub Test()
Selection.Value = "Did it " & vbLf & "work?"
End Sub

--------------------


Seems the answer is No, not in a control tip text string.

Hope that's right... so often there's more to it...
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 166
Default Assigning control tip text

On Sun, 15 Feb 2009 07:46:37 +0000, Simon Lloyd
wrote:


Don't use the string $, you can use a number of ways
Code:
--------------------
MsgBox "This is a" & vbLf & "test for" & Chr(10) & "adding new" & vbNewLine & "Lines!"


Gotcha. But again not in the control text enviroment.
Thanks - Kirk
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Assigning control tip text

Is this on a userform?

If yes:

Saved from a previous post.

How about just putting a label over the control and that control in a frame.

Then when you mouse over the frame, it'll hide the label. But when you mouse
over the control, you'll show the label.

Option Explicit
Private Sub CommandButton1_MouseMove(ByVal Button As Integer, _
ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
Me.Label1.Visible = True
End Sub
Private Sub Frame1_MouseMove(ByVal Button As Integer, _
ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
Me.Label1.Visible = False
End Sub



kirkm wrote:

Can you add a linefeed programicably?

I'm finding chr$(13) and vblf etc. just print a square in the text.

Thanks - Kirk


--

Dave Peterson
  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Assigning control tip text

Similar to what Dave said, here is another Label method for a pseudo tooltip
method on a userform.

Private Sub UserForm_Initialize()
Label1.Visible = False
End Sub

Private Sub UserForm_MouseMove(ByVal Button As Integer, ByVal Shift As
Integer, ByVal X As Single, ByVal Y As Single)
Label1.Visible = False
End Sub

Private Sub CommandButton1_MouseMove(ByVal Button As Integer, ByVal Shift As
Integer, ByVal X As Single, ByVal Y As Single)
With Label1
.Caption = "CommandButton1:" & vbCrLf & "Line2"
.Left = CommandButton1.Left
.Top = CommandButton1.Top - 30
.Visible = True
End With
End Sub
  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Assigning control tip text


Hello kirm,

Dave's suggestion is the easiest to implement. Again, if this on a
UserForm you can create true multi-line ToolTips. This requires using a
lot of Windows API calls to accomplish the task. Thought you might like
to know.


--
Leith Ross

Sincerely,
Leith Ross

'The Code Cage' (http://www.thecodecage.com/)
------------------------------------------------------------------------
Leith Ross's Profile: http://www.thecodecage.com/forumz/member.php?userid=75
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=64545

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Assigning a query to a control button StephanieL Excel Programming 1 February 27th 04 01:32 PM
Assigning Macro's to control buttons. catdataman Excel Programming 3 December 23rd 03 05:16 PM
Assigning Multiple Macros to One ComboBox Control Tim Zych[_2_] Excel Programming 0 July 23rd 03 06:36 PM
Assigning Multiple Macros to One ComboBox Control Michael J. Malinsky Excel Programming 0 July 23rd 03 06:10 PM
Assigning the name of a userform/control to a changing string Brad Patterson Excel Programming 2 July 16th 03 11:00 PM


All times are GMT +1. The time now is 09:34 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"