Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a spreadsheet which contains a Combobox with an Index function to
display information from the selected record of another worksheet. I have created a Form with a picture object and have added the following code to the form: Private Sub UserForm_Initialize() Dim PicPath As String ' Declare Picpath ' The path and filename of the selected record's picture is contained within cell F9 PicPath = ("F9") frmLabel.Picture = LoadPicture("PicPath") End Sub Surprisingly it doesn't work. Can someone help me with this and tell me what I have missed please? Dylan Dawson Scotland |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Private Sub UserForm_Initialize()
Dim PicPath As String ' Declare Picpath ' The path and filename of the selected record's picture is contained within cell F9 PicPath = cells(9,6) frmLabel.Picture = LoadPicture(PicPath) End Sub -john "DDawson" wrote: I have a spreadsheet which contains a Combobox with an Index function to display information from the selected record of another worksheet. I have created a Form with a picture object and have added the following code to the form: Private Sub UserForm_Initialize() Dim PicPath As String ' Declare Picpath ' The path and filename of the selected record's picture is contained within cell F9 PicPath = ("F9") frmLabel.Picture = LoadPicture("PicPath") End Sub Surprisingly it doesn't work. Can someone help me with this and tell me what I have missed please? Dylan Dawson Scotland |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi John,
Thanks for the info - I added it as a Worksheet Calculate Function to an Image object as follows, can you help me with error handling, I get the following error "Runtim-error '53': File not found: Private Sub Worksheet_Calculate() Dim PicPath As String ' Declare Picpath ' The path and filename of the selected record's picture is contained within cell F9 PicPath = Cells(9, 6) Image1.Picture = LoadPicture(PicPath) End Sub |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Problem Solved !
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VBA code for sizing/showing pictures | Excel Discussion (Misc queries) | |||
Pictures.Visible question (after adding many pictures, they stop disappearing) | Excel Programming | |||
Newbie - Input Form Question | Excel Programming | |||
Showing Pictures | Excel Programming | |||
Copy form and code question | Excel Programming |