Replacement for Visual Basic Object "CommonDialog"

kato01

Board Regular
Joined
Sep 9, 2005
Messages
81
Hello,

I have some old visual basic macros I am trying to convert to excel VBA.

I am not sure what to do about the CommonDialog object. Searching online, I found that it’s obsolete and replaced by something else. Couldn’t find by what.

Any suggestions



Thanks
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Hi. Converting VB6 code and older (32 bit) VBA code to (64 bit) VBA seems to have become a bit of a hobby for me, so your question re the common dialog control certainly resonates. :)

The common dialog control is broadly obsolete for those using VBA today, because much of its functionality had been abstracted away for us. Basically, it was a way to call certain system dialog boxes: (1) Open File Dialog; (2) Save File Dialog; (3) the Colour Picker Dialog; (4) the Font Chooser Dialog; (5) the Printer Dialog and, off the top of my head, maybe one or two others.

In terms of your conversion of your older code to something usable today, it'll depend on which of the above you're trying to use.

I think that there are class modules that you could import into your project that might effectively work as a drop-in replacement for the control, and therefore help avoid having to change any of your code, but it shouldn't really be that difficult to update your code.
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top