MrDavidThorn
asked on
VBA word 2010 Common dialog box licence problem
Hi Experts
I have designed a macro enabled word document with a form that contains a common dialog box, works fine on my own machine, when the document is opened by other users - they can not access the common dialog box due to MS licence issues (http://dutchgemini.wordpress.com/2010/12/23/vba-cannot-create-mscomdlg-commondialog-activex/) - I can resolve the problem using the reg fix in the url, however Im unsure of licence restriction and dont want to tempt fate, is there away to get around the common dialog licence problem (doesnt make sense as all users have it install anyhow) - or can I use an API call for a user to select a file (its an Excel file the user needs to select)
Dim cdExcelFile As Object
Set cdExcelFile = VBA.CreateObject("MSComDlg .CommonDia log")
cdExcelFile.DialogTitle = "Select new source file"
cdExcelFile.Flags = cdlOFNFileMustExist + cdlOFNPathMustExist
cdExcelFile.Filter = "Microsoft Excel Workbooks (*.xls;*.xlsx;*.xlsm)|*.xl s;*.xlsx;* .xlsm;"
cdExcelFile.ShowOpen
I have designed a macro enabled word document with a form that contains a common dialog box, works fine on my own machine, when the document is opened by other users - they can not access the common dialog box due to MS licence issues (http://dutchgemini.wordpress.com/2010/12/23/vba-cannot-create-mscomdlg-commondialog-activex/) - I can resolve the problem using the reg fix in the url, however Im unsure of licence restriction and dont want to tempt fate, is there away to get around the common dialog licence problem (doesnt make sense as all users have it install anyhow) - or can I use an API call for a user to select a file (its an Excel file the user needs to select)
Dim cdExcelFile As Object
Set cdExcelFile = VBA.CreateObject("MSComDlg
cdExcelFile.DialogTitle = "Select new source file"
cdExcelFile.Flags = cdlOFNFileMustExist + cdlOFNPathMustExist
cdExcelFile.Filter = "Microsoft Excel Workbooks (*.xls;*.xlsx;*.xlsm)|*.xl
cdExcelFile.ShowOpen
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.