![]() |
#2
|
||||
|
||||
![]()
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 |
|
![]() |
||||
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 |
![]() |
enginist | Word | 4 | 08-03-2014 09:29 PM |
![]() |
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 |