Microsoft Access VBA Macro Programming

(Tina Sui) #1
The Save File As Dialog

The Save File As dialog works in almost exactly the same way as the preceding Open dialog
example, but the title (MyFile.lpstrTitle) needs to be changed to a different string, such as
“Select a file to Save to.”
The parameters are set in exactly the same way as the Open File example mentioned
earlier and the user will be prompted to browse to a file or to enter in a new file name. The
file name selected is captured in the variable MyFile.lpstrfile in the same way, and you can
then write code to save the data to that file name.

The Color Dialog

The Color dialog allows the user to select a color from a palette or create and select a custom
color, as shown in Figure 10-1.

126 Microsoft Access 2010 VBA Macro Programming


Figure 10-1 The Color dialog
Free download pdf