VBA error

mtagliaferri

Registered User.
Local time
Today, 21:23
Joined
Jul 16, 2006
Messages
550
Hi I have a code I have got from the samples for adding a picture to a form, when I run the code it give me a error as "SUB OR FUNCTION NOT DEFINED"
My code is as following :

Code:
Private Sub CmdAdd_Click()
On Error GoTo err_cmdAdd

    Me![txtPicture] = GetOpenFile_CLT("C:\", "Select the File")
    Me![txtPicture] = LCase(Me![txtPicture])
    Me!Picture.Picture = Me!txtPicture

exit_cmdAdd:
    Exit Sub
    
err_cmdAdd:
    MsgBox Error$
    Resume exit_cmdAdd
End Sub

Can you give some help
 
Haven't got a clue on why you're to achieve.
Anyway, in your code you're referring to a function called GetOpenFile_CLT
Do you have such a function defined?

RV
 
I have copied the vba from a sample to add a photo on a form, I believe the GetOpenFile_CLT referes to browse the folders to find the picture!!!
Thas this help!!!
Marco
 

Users who are viewing this thread

Back
Top Bottom