Consulting

Results 1 to 2 of 2

Thread: How would I open a MsgBox or Inputbox in Excel, but from Outlook's VBA session?

  1. #1

    How would I open a MsgBox or Inputbox in Excel, but from Outlook's VBA session?

    I have built a couple macros that automagically get the attached spreadsheets from an email, open them, prompt the user and then apply a reformat function; but I need to specify which reformat is required via an InputBox.
    Issue is that the InputBox is asking from Outlook but I absolutely need it to open in the Excel application. I thought something similar this would work:
    __
    'code from outlook's vba (ThisOutlookSession)
    Dim Xl As Object
    Set Xl = New Excel.Application
    Xl.MsgBox "Test"
    __
    This syntax/code is completely wrong as the 'Application' object (Xl) doesn't have a 'MsgBox' property, but I hope it demonstrates what it is i'm trying to achieve.

    I have been googling for a couple days now, have asked in 4 or 5 forums and nobody seems to know how to do this. Am willing to pay someone for the answer at this point, if it is at all possible!

    Thanks for your time

  2. #2
    VBAX Guru Kenneth Hobs's Avatar
    Joined
    Nov 2005
    Location
    Tecumseh, OK
    Posts
    4,956
    Location
    Welcome to the forum!

    VBA.MsgBox would be used but it would focus on the Outlook's VBA. Try using XI.InputBox?

Posting Permissions

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