Link to home
Start Free TrialLog in
Avatar of MrDavidThorn
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.CommonDialog")
cdExcelFile.DialogTitle = "Select new source file"

cdExcelFile.Flags = cdlOFNFileMustExist + cdlOFNPathMustExist
cdExcelFile.Filter = "Microsoft Excel Workbooks (*.xls;*.xlsx;*.xlsm)|*.xls;*.xlsx;*.xlsm;"



cdExcelFile.ShowOpen
ASKER CERTIFIED SOLUTION
Avatar of GrahamSkan
GrahamSkan
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial