Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Dataexport = "c:\Excel Test.xls"'this name the path of the excel file you need to write to
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97, "Test1", Dataexport, True
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97, "Test2", Dataexport, True
Dim FilePath1, FileNamePath1, Dataexport
FilePath1 = LaunchCD(Me)
If FilePath1 = "" Or IsNull(FilePath1) Then
Else
FileNamePath1 = FilePath1 & ".xls"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97, "Contact Report Query", FileNamePath1, True
End If
Private Declare Function GetOpenFileName Lib "comdlg32.dll" Alias _
"GetOpenFileNameA" (pOpenfilename As OPENFILENAME) As Long
Private Type OPENFILENAME
lStructSize As Long
hwndOwner As Long
hInstance As Long
lpstrFilter As String
lpstrCustomFilter As String
nMaxCustFilter As Long
nFilterIndex As Long
lpstrFile As String
nMaxFile As Long
lpstrFileTitle As String
nMaxFileTitle As Long
lpstrInitialDir As String
lpstrTitle As String
flags As Long
nFileOffset As Integer
nFileExtension As Integer
lpstrDefExt As String
lCustData As Long
lpfnHook As Long
lpTemplateName As String
End Type
Function LaunchCD(strform As Form) As String
Dim OpenFile As OPENFILENAME
Dim lReturn As Long
Dim sFilter As String
OpenFile.lStructSize = Len(OpenFile)
OpenFile.hwndOwner = strform.Hwnd
sFilter = "Excel Files (*.xls)" & Chr(0) & "*.xls"
OpenFile.lpstrFilter = sFilter
OpenFile.nFilterIndex = 1
OpenFile.lpstrFile = String(257, 0)
OpenFile.nMaxFile = Len(OpenFile.lpstrFile) - 1
OpenFile.lpstrFileTitle = OpenFile.lpstrFile
OpenFile.nMaxFileTitle = OpenFile.nMaxFile
OpenFile.lpstrInitialDir = "C:\"
OpenFile.lpstrTitle = "Select an Microsoft Excel file"
OpenFile.flags = 0
lReturn = GetOpenFileName(OpenFile)
If lReturn = 0 Then
MsgBox "A file was not selected!", vbInformation, _
"Select an Microsoft Excel file"
Else
LaunchCD = Trim(Left(OpenFile.lpstrFile, InStr(1, OpenFile.lpstrFile, vbNullChar) - 1))
End If
End Function
Something = List_Box_Name.Column(1)