Will not open Dialog box

G

Guest

Doug,
Sorry for wasting your time, this is what I wanted. I really do appreciate
your help. I really need to spend some time with the API code.

DoCmd.RunCommand acCmdImport
 
G

Guest

I copied all of this code and tried it, but I get a Compile error:
User-defined type not defined on:

Dim OFN As tagOPENFILENAME

....even though I copied the Type def, as follows:

Type tagOPENFILENAME
lStructSize As Long
hwndOwner As Long
hInstance As Long
strFilter As String
strCustomFilter As String
nMaxCustFilter As Long
nFilterIndex As Long
strFile As String
nMaxFile As Long
strFileTitle As String
nMaxFileTitle As Long
strInitialDir As String
strTitle As String
Flags As Long
nFileOffset As Integer
nFileExtension As Integer
strDefExt As String
lCustData As Long
lpfnHook As Long
lpTemplateName As String
End Type

This is in a real module, not a class module. I'm running Access and VB
installed with Office 2007 Enterprise. Any thoughts?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top