Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 08-29-2021, 09:10 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,158
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

I'm not sure what you mean by label. This code looks like it is displaying a form containing picture on the screen and either moving the picture within that form or the entire form.

If it is a vba userform that you want to move across the screen, something like this works
Code:
#If VBA7 And Win64 Then    ' For 64bit version of Excel
    Private Declare PtrSafe Sub Sleep Lib "kernel32.dll" (ByVal dwMilliseconds As LongPtr)
#Else    ' For 32bit version of Excel
    Private Declare Sub Sleep Lib "kernel32.dll" (ByVal dwMilliseconds As Long)
#End If

Private Sub UserForm_Activate()
  Dim iLastPos As Long, iMove As Long
  
  With Me
    iLastPos = Application.Left + Application.Width - .Width
    iMove = 10
    .Left = Application.Left
    Do While .Left < iLastPos
      Sleep 50
      .Left = .Left + iMove
    Loop
  End With
  Me.Hide
End Sub

Private Sub UserForm_Initialize()
  With Me
    .Top = Application.Top + 0.5 * (Application.Height - .Height)
  End With
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
 



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 10:27 AM.


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