ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Show Image When File Opened (https://www.excelbanter.com/excel-programming/409604-show-image-when-file-opened.html)

bony_tony

Show Image When File Opened
 
How can I get a logo image to show for a couple of seconds every time
a file is opened?
Hide the image on a sheet then unhide it??
Cheers

joel

Show Image When File Opened
 
Make the logo visible and then invisiable. Other method would be to put logo
in unsed area of workbook and move to the logo and then move back to where
your data is located.

Private Sub Workbook_Open()

'move to worksheet and cell where logo is located
Sheets("Sheet1").Activate
Range("Z10").Activate

For Each pict In ActiveSheet.Shapes
If pict.Name = "Picture 1" Then
Set logo = pict
Exit For
End If
Next pict


logo.Visible = True

newHour = Hour(Now())
newMinute = Minute(Now())
newSecond = Second(Now()) + 10
waitTime = TimeSerial(newHour, newMinute, newSecond)
Application.wait waitTime
logo.Visible = False

End Sub


"bony_tony" wrote:

How can I get a logo image to show for a couple of seconds every time
a file is opened?
Hide the image on a sheet then unhide it??
Cheers


Tara H

Show Image When File Opened
 
One option would be to have your logo image on a form, and put the following
code in the Activate event:

Private Sub UserForm_Activate()
UserForm1.Repaint
PauseTime = 2 ' Set duration in seconds
Start = Timer ' Set start time.
Do While Timer < Start + PauseTime
Loop
Finish = Timer
UserForm1.Hide
End Sub

(code from post by Mike H)

"bony_tony" wrote:

How can I get a logo image to show for a couple of seconds every time
a file is opened?
Hide the image on a sheet then unhide it??
Cheers



All times are GMT +1. The time now is 02:21 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com