Consulting

Results 1 to 3 of 3

Thread: Solved: Hidden Ribbon

  1. #1

    Solved: Hidden Ribbon

    Hello,

    I need your help. I have an Excel '07 worksheet that has a hidden ribbon in order to limit the UI. This was done to prevent damage to the worksheet and make the data entry easier. However, on one of the worksheets within this workbook I would like the user to be able to attach a small jpeg picture. Can this be accomplished in VBA? I tried the SendKey method without success. Is there another way? Please advise.

    Thank you!!

  2. #2
    I think it can be as simple as this:

    [VBA]Sub InsertPictureExample()
    Dim vFilename As Variant
    Dim sPath As String
    sPath = "c:\YourPathGoesHere\"
    ChDrive sPath
    ChDir sPath
    vFilename = Application.GetOpenFilename("picture files (*.jpg),*.jpg", , "Please select the file to insert", , False)
    If TypeName(vFilename) = "Boolean" Then Exit Sub
    If CStr(vFilename) = "" Then Exit Sub
    If Dir(CStr(vFilename)) <> "" Then
    ActiveSheet.Pictures.Insert CStr(vFilename)
    End If
    End Sub

    [/VBA]
    Regards,

    Jan Karel Pieterse
    Excel MVP jkp-ads.com

  3. #3
    Thank you for your reply. I appreciate your time and effort. I'm sorry I haven't thanked you before now. I just found your reply.
    Thank you again!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •