Darryl Collins
darryl at whittleconsulting.com.au
Mon May 28 20:10:20 CDT 2012
Arthur, Just a reminder to check which Bit OS you are using. If you are using 64 Bit windows you need to use a different API call than the 32 Bit version. This can cause the API to work fine on one system and fail on another. If you are unsure you can wrap the API call with a condition of "IF #VBA7 Then blah blah" Cheers Darryl. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Tuesday, 29 May 2012 10:19 AM To: Access Developers discussion and problem solving Subject: [AccessD] What's wrong with this? I'm looking at an InsideAccess article on MSDN that's about FileOpen and FileSaveAs. It's got some wonky spacing and punctuation, that I've tried to clean up, but so far unsuccessfully. Here's what I have so far, and it won't permit it. I'm hoping someone can either tell me what's wrong or maybe has this code in a form that is considered acceptable. This is in a class module called CommonDialogAPI: One thing that strikes me as odd is the lack of commas between items, but maybe that's just the TYPE syntax. I don't know. <vba> 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 </vba> Can you help? TIA. -- Arthur Cell: 647.710.1314 Prediction is difficult, especially of the future. -- Niels Bohr -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com