Excel 97 - Common Dialog Control Help

R

Russell Plummer

Trying to add the Save As dialog in Excel 97 VBA.

Have followed the instructions as per Richard Shepard's book, namely:
- Opened a blank user form
- Gone to Tools -> Additional Controls
- Found Microsoft Common Dialog Control, Version 6.0 and ticked it
- Seen the Common Dialog icon appear on the Toolbox

When I dragged the Common Dialog tool over onto the blank form I got an
Error from Visual Basic saying "The Control could not be created because it
is not properly licensed"

Can anyone offer any enlightenment?

Thanks

Russell

(e-mail address removed)
 
J

Jean-Yves

Hi Russel,
You don't need to create it.
You can call the xl save as dialog box as follows
look for "GetSaveAsFilename"
Regards,
JY
Dim strNameToSaveAs As String
ChDrive ("R:\")
ChDir ("R:\cbt\")
'here you show the dialog
strNameToSaveAs =
Application.GetSaveAsFilename(InitialFilename:="Statistics",
FileFilter:="Microsoft Excel File (*.xls),*.xls")
'it return -but does nothing yet - the file name tho saveas
If strNameToSaveAs = "False" Then
Exit Sub
Else
ActiveWorkbook.SaveAs FileName:=strNameToSaveAs, _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
End If
 
D

David Fixemer

Mr. Russell Plummer

Jean-Yves has GREAT advise, and I would strongly
recommend using it. However, I can expand upon your
common dialog box problem a little further.

My understanding is that companies such as Microsoft
have developed a wide variety of user interface tools in
the form of *.dll and *.ocx files. When these companies
develop applications utilizing the tools, they need
anyone/everyone to be able to use them. This is done
by "registering" them on a machine, which anyone/everyone
can do for free and your machine probably has. However,
they did want to get paid for their time/effort in
developing the tools, so they charge the
developer/designer a "licensing" fee. In other words, you
have to pay to use them in a new design, however, once
designed, anyone can use them for free.

This licensing privliage can be obtained by
purchasing a developer edition of Excel (no idea of cost).

Sincerely,

David Fixemer
 
K

Keith Willshaw

David Fixemer said:
Mr. Russell Plummer

Jean-Yves has GREAT advise, and I would strongly
recommend using it. However, I can expand upon your
common dialog box problem a little further.

My understanding is that companies such as Microsoft
have developed a wide variety of user interface tools in
the form of *.dll and *.ocx files. When these companies
develop applications utilizing the tools, they need
anyone/everyone to be able to use them. This is done
by "registering" them on a machine, which anyone/everyone
can do for free and your machine probably has. However,
they did want to get paid for their time/effort in
developing the tools, so they charge the
developer/designer a "licensing" fee. In other words, you
have to pay to use them in a new design, however, once
designed, anyone can use them for free.

This licensing privliage can be obtained by
purchasing a developer edition of Excel (no idea of cost).

Gettingthe developer edition of Excel is not the only route, the
same controls are licensed in the development
environment with VB6.

Keith
 
R

Russell Plummer

All,

Thank you for the comments. I did take Jean-Yves advice and it works very
well.

As for the licencing, well it makes sense but is it sense? All I am trying
to do is to create some time-saving tools using Excel 97 (as I cannot be
sure what version of Excel the recipients will be using) and so getting a
developer version for 97 could be difficult.

Anyway, thanks again

Russell
 
K

Keith Willshaw

Russell Plummer said:
All,

Thank you for the comments. I did take Jean-Yves advice and it works very
well.

As for the licencing, well it makes sense but is it sense? All I am trying
to do is to create some time-saving tools using Excel 97 (as I cannot be
sure what version of Excel the recipients will be using) and so getting a
developer version for 97 could be difficult.

So get a copy of VB6 and you not only get the ability to use the
common dialog controls but can build your own ActiveX
controls in a custom OCX and hide the code from prying
eyes.

Keith
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top