Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-30-2021, 06:15 PM
Guessed's Avatar
Guessed Guessed is offline Move words from right to left on a label. I don't have the Timer control Windows 10 Move words from right to left on a label. I don't have the Timer control Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,185
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

You are right, they are called labels in English versions of Office too. OK, try this code where the text is in a label called labelTicker


Code:
#If VBA7 And Win64 Then    ' For 64bit versions
    Private Declare PtrSafe Sub Sleep Lib "kernel32.dll" (ByVal dwMilliseconds As LongPtr)
#Else    ' For 32bit versions
    Private Declare Sub Sleep Lib "kernel32.dll" (ByVal dwMilliseconds As Long)
#End If

Private Sub UserForm_Activate()
  Dim iWidth As Integer, iFormWidth As Integer, iStep As Integer
  
  iStep = 1
  iFormWidth = Me.Width - 20
  With Me.labelTicker
    .Left = iFormWidth
    Do
      Sleep 20
      DoEvents
      If .Left > -1 * .Width Then
        .Left = .Left - iStep
      Else
        .Left = iFormWidth
      End If
    Loop
  End With
End Sub

Private Sub UserForm_Initialize()
  With Me
    .Top = Application.Top + 0.5 * (Application.Height - .Height)
    .Left = Application.Left + 0.5 * (Application.Width - .Width)
  End With
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #2  
Old 08-31-2021, 02:10 AM
gorkac gorkac is offline Move words from right to left on a label. I don't have the Timer control Windows 10 Move words from right to left on a label. I don't have the Timer control Office 2019
Banned
Move words from right to left on a label. I don't have the Timer control
 
Join Date: Jul 2021
Location: Usa
Posts: 62
gorkac is on a distinguished road
Default

Wow, its run. Thank you very much, Mr. Andrew.
Reply With Quote
  #3  
Old 08-31-2021, 04:47 PM
gorkac gorkac is offline Move words from right to left on a label. I don't have the Timer control Windows 10 Move words from right to left on a label. I don't have the Timer control Office 2019
Banned
Move words from right to left on a label. I don't have the Timer control
 
Join Date: Jul 2021
Location: Usa
Posts: 62
gorkac is on a distinguished road
Default

Mr. Andrew. Two questions.
1.- If I want to add another message in the same form?
2.- Can I control the speed of the text?

Thanks in advance.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to edit columns and move the right column more to the left? bchinjy Word 3 07-29-2019 05:23 AM
move the milestone label to left of column wilster31 Project 0 07-31-2017 07:58 AM
Move words from right to left on a label. I don't have the Timer control How to move page numbers left and right in header enginist Word 4 08-03-2014 09:29 PM
Move words from right to left on a label. I don't have the Timer control How to either move document display to right or left; or reduce size of find/replace window. pmstock Word 2 08-02-2014 08:34 PM
i want to place labels on to the left of the page anchored to words within soooty Word 0 07-07-2010 09:18 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:43 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft