Welcome to the Excel Forum

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed.

Please Register to Remove these Ads

Please Register to Remove these Ads



Reply
  #1  
Old 11-20-2009, 01:52 PM
DaveInOhio DaveInOhio is offline
Registered User
 
Join Date: 20 Nov 2009
Location: Columbus, Ohio, USA
MS Office Version:Excel 2003
Posts: 2
DaveInOhio is becoming part of the community
FileDialog

Please Register to Remove these Ads

I have done quite a bit of simple Office VBA programming, so I must be doing something silly and would sure appreciate some help to get past it.

From within Outlook (2003) I used Alt-F11 to start Microsoft Visual Basic.
The following sub
Code:
Sub test1()
    Dim Dialog As Office.FileDialog
    Set Dialog = Application.FileDialog(msoFileDialogFilePicker)
    MsgBox "did it"
End Sub
produces the error "Run-time error '438': Object doesn't support this property or method"

In the Tools>References dialog, the checked items are:
  • Visual Basic for Applications
  • Microsoft Outlook 11.0 Object Library
  • Microsoft Office 11.0 Object Library
  • Microsoft Excel 11.0 Object Libarry
  • OLE Automation
  • Microsoft Forms 2.0 Object Library

Can someone please tell me what I've missed?

Thanks!

Dave
Reply With Quote
  #2  
Old 11-24-2009, 09:06 AM
darbid darbid is offline
Registered User
 
Join Date: 09 Nov 2008
Location: germany
Posts: 40
darbid has been very helpful
re: FileDialog

pretty sure that from outlook you cannot use the file dialog.

Just initiate a Word application or Excel application and then initiate the file dialog that way.
Reply With Quote
  #3  
Old 11-24-2009, 11:18 PM
DaveInOhio DaveInOhio is offline
Registered User
 
Join Date: 20 Nov 2009
Location: Columbus, Ohio, USA
MS Office Version:Excel 2003
Posts: 2
DaveInOhio is becoming part of the community
re: FileDialog

Thanks! I created an Excel object and it works fine. I appreciate your help.

Dave
Reply With Quote


Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Forum Jump