Skip to Content
0
Former Member
Sep 16, 2016 at 12:05 PM

Opening macro enabled excel worksheet in an ole control

116 Views

Hi,

I need to open a macro enabled worksheet (.xlsm) file in an ole Control. It just does not show up. While inserting Ole Control I chose the right Control type "Microsoft Excel macro-enabled worksheet" but still it does not work. However if I insert an xlsx file in ordinary excel ole Control it works fine. Any ideas?

Code:

ole_2.DisplayType = DisplayAsActivexDocument!

ole_2.insertfile(as_file_name)

ole_2.Activate(Inplace!)

Thanks

Vinay