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

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
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,214,793
Messages
6,121,617
Members
449,039
Latest member
Mbone Mathonsi

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