Programatically? hmmm, do you mean in a macro or are you meaning that you will write a VBexe file which would add this control to an Excel Spreadsheet? I wouldn't see why you couldn't use the following:
<code>
Dim cd As New CommonDialog
</code>
This creates a new object "cd" as a CommonDialog control so it is as if a person were to drag and draw a CommonDialog control onto the form. I hope this helps a bit...
LF
"As far as the laws of mathematics refer to reality, they are not certain; as far as they are certain, they do not refer to reality."--Albert Einstein
Sample code for what? I provided the sample code in order to create the CommonDialog object. Now that you have that you can do anything that a regular CommonDialog control can do and probably more. Just type the following after you have put the line from my previous posting in your code module:
cd.
and you will see that all sorts of methods, events and the such pop up. Use your imagination and see what you can do with it.
try:
cd.ShowOpen
and then run the macro to see what happens. The code is there, you just have to think about it and work it out.
LF
"As far as the laws of mathematics refer to reality, they are not certain; as far as they are certain, they do not refer to reality."--Albert Einstein
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.