I have a form I have been working with. The form it self need to be protected. I don't know much about VBA programming so there lies my issue.
I have this button with this code to it.
Private Sub Bilaga_Click()
' Browse & Select File
With Application.FileDialog(msoFileDialogFilePicker)
.AllowMultiSelect = True
.Title = "Select the File that you want to insert"
If .Show = True Then
FiletoInsert = .SelectedItems(1)
Else
Exit Sub
End If
End With
' Embed File Inline
Application.Selection.InlineShapes.AddOLEObject _
FileName:=FiletoInsert, _
LinkToFile:=False, _
DisplayAsIcon:=True, _
IconLabel:=Right(FiletoInsert, Len(FiletoInsert) - InStrRev(FiletoInsert, "\"))
What I need it to do is to add the attached file to a textbox or some other means in the protected document.
I know the above code attache the file to the form but only works when unprotected.
Any help is appreciated