Results 1 to 2 of 2
  1. #1
    4 Star Lounger
    Join Date
    Aug 2003
    Location
    Stroud, United Kingdom
    Posts
    548
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Open Form Button (2003)

    Is there an easy way to open a custom form from a taskbar button? I can't seem to code for it in VBA. I want a dropdown button with a list of various email forms I have designed to open. Can't find any help anywhere!
    Thanks,

    pmatz

  2. #2
    4 Star Lounger
    Join Date
    Aug 2003
    Location
    Stroud, United Kingdom
    Posts
    548
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Open Form Button (2003)

    Sorry if everyone knows this and I am just answering my own questions, but found this code here which is exactly what I needed.

    To open ANY custom published form, put this code in the the VB Editor and add a button assigned to that macro. (you just need to know your form's name)

    Sub openForm()
    Set objfolder = Application.ActiveExplorer.CurrentFolder
    Debug.Print objfolder.Name
    Set objItem = objfolder.Items.Add("IPM.Note.Temp") 'here is where you put the form's name
    objItem.Display
    Set objItem = Nothing
    End Sub

    NIghtNight
    Thanks,

    pmatz

Posting Permissions

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