Kostas Konstantinidis
kost36 at otenet.gr
Sun Sep 30 04:12:38 CDT 2012
that's the code '-------------------------------------------------------------------------------------------------------------- ' Copyright (C)1998-99 Dev Ashish and Terry Kreft, All Rights Reserved ' The Access Web (http://home.att.net/~dashish) ' Comments and bug reports can be emailed to us ' Dev Ashish (dash10 at hotmail.com) ; Terry Kreft (terry.kreft at mps.co.uk) '-------------------------------------------------------------------------------------------------------------- Private Type OPENFILENAME lStructSize As Long hwnd 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 Private Declare Function GetOpenFileName _ Lib "comdlg32.dll" Alias "GetOpenFileNameA" _ (pOpenfilename As OPENFILENAME) As Long Private Declare Function GetSaveFileName Lib "comdlg32.dll" Alias "GetSaveFileNameA" (pOpenfilename As OPENFILENAME) As Long Private Const OFN_FILEMUSTEXIST = &H1000 Private Const OFN_HIDEREADONLY = &H4 Private Const OFN_OVERWRITEPROMPT = &H2 Private Const OFN_PATHMUSTEXIST = &H800 Private Const OFN_SAVE = 0 Private Const OFN_OPEN = 1 Private Type CTLInf Name As String Enabled As Boolean End Type Private Declare Function apiSortStringArray Lib "msaccess.exe" _ Alias "#81" _ (astrStringArray() As String) _ As Long Private arrCtls() As CTLInf Private mvarOriginalFields As Variant Private Const mconQ = """" -----Original Message----- From: Stuart McLachlan Sent: Sunday, September 30, 2012 11:34 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] comdlg32.dll That URL is about registering the OCX, not using the DLL. Which one are you using? -- Stuart On 30 Sep 2012 at 11:23, Kostas Konstantinidis wrote: > hi Stuart, > > detailed instructions I found also at > http://devonenote.com/2010/02/register-comdlg32-ocx-on-x64-win7/ > > thank you very much > > /kostas > > > > > > -----Original Message----- > From: Stuart McLachlan > Sent: Friday, September 28, 2012 11:35 AM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] comdlg32.dll > > You can still use comdlg32.dll. It's available in both 32 and 64 bit > Windows. > > But you need to compile with the PtrSafe keyword. Try this: > > Declare PtrSafe Function GetOpenFileName Lib "comdlg32.dll" _ > Alias "GetOpenFileNameA" (OFN As tagOPENFILENAME) As > Boolean > > If you code is likely to run in different versions of Windows/Office (32 > and > 64 bit), you need to > wrap the declarations in compiler conditionals. > > #If VBA7 Then > Declare PtrSafe Function GetOpenFileName Lib "comdlg32.dll" _ > Alias "GetOpenFileNameA" (OFN As tagOPENFILENAME) As > Boolean > #Else > Declare Function GetOpenFileName Lib "comdlg32.dll" _ > Alias "GetOpenFileNameA" (OFN As tagOPENFILENAME) As > Boolean > #End if > > See http://msdn.microsoft.com/en-us/library/ee691831%28office.14%29.aspx > for > all the gory > details. > > -- > Stuart > On 28 Sep 2012 at 10:29, Kostas Konstantinidis wrote: > > > Hi all, > > I use the comdlg32.dll on a Dev Ashish and Terry Kreft 1999 code > > but now while we have upgraded to win 7 64-bit and office 64 > > it need an update for all that... > > Is really there a "comdlg32.dll" available for office 64-bit? > > > > thank's a lot > > > > /kostas > > -- > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/accessd > > Website: http://www.databaseadvisors.com > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com