Standard Windows Forms

skonves

New Member
Joined
Mar 31, 2005
Messages
37
In VB.net 2003 it is possible to use standard windows forms such as the 'Open', 'Save', and 'Print' forms. Is there any way to utilize these in VBA by referencing a library file or something like that. Any help would be great.
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Public Sub ShowFileOpen()
'Open the File Open dialog.

Application.Dialogs(xlDialogOpen).Show

End Sub



Public Sub ShowPrintDialog()
'Open the print dialog and reset the default to selected area not entire document!
'Which is the 12th argument for that dialog.

Application.Dialogs(xlDialogPrint).Show arg12:=1

End Sub



Short Name Full Dialog box constant Code Argument list(s)

[Application.Dialogs(xlDialogXXXXXX).Show arg12:=1]

where 12=XX is the index number of the argument from left to right on lists below.

Activate xlDialogActivate window_text, pane_num
ActiveCellFont xlDialogActiveCellFont font, font_style, size, strikethrough, superscript, subscript, outline, shadow, underline, color, normal, background, start_char, char_count
AddChartAutoformat xlDialogAddChartAutoformat name_text, desc_text
AddinManager xlDialogAddinManager operation_num, addinname_text, copy_logical
Alignment xlDialogAlignment horiz_align, wrap, vert_align, orientation, add_indent
ApplyNames xlDialogApplyNames name_array, ignore, use_rowcol, omit_col, omit_row, order_num, append_last
ApplyStyle xlDialogApplyStyle style_text
AppMove xlDialogAppMove x_num, y_num
AppSize xlDialogAppSize x_num, y_num
ArrangeAll xlDialogArrangeAll arrange_num, active_doc, sync_horiz, sync_vert
AssignToObject xlDialogAssignToObject macro_ref
AssignToTool xlDialogAssignToTool bar_id, position, macro_ref
AttachText xlDialogAttachText attach_to_num, series_num, point_num
AttachToolbars xlDialogAttachToolbars
AutoCorrect xlDialogAutoCorrect correct_initial_caps, capitalize_days
Axes xlDialogAxes x_primary, y_primary, x_secondary, y_secondary
Axes xlDialogAxes x_primary, y_primary, z_primary
Border xlDialogBorder outline, left, right, top, bottom, shade, outline_color, left_color, right_color, top_color, bottom_color
Calculation xlDialogCalculation type_num, iter, max_num, max_change, update, precision, date_1904, calc_save, save_values, alt_exp, alt_form
CellProtection xlDialogCellProtection locked, hidden
ChangeLink xlDialogChangeLink old_text, new_text, type_of_link
ChartAddData xlDialogChartAddData ref, rowcol, titles, categories, replace, series
ChartLocation xlDialogChartLocation
ChartOptionsDataLabels xlDialogChartOptionsDataLabels
ChartOptionsDataTable xlDialogChartOptionsDataTable
ChartSourceData xlDialogChartSourceData
ChartTrend xlDialogChartTrend type, ord_per, forecast, backcast, intercept, equation, r_squared, name
ChartType xlDialogChartType
ChartWizard xlDialogChartWizard long, ref, gallery_num, type_num, plot_by, categories, ser_titles, legend, title, x_title, y_title, z_title, number_cats, number_titles
CheckboxProperties xlDialogCheckboxProperties value, link, accel_text, accel2_text, 3d_shading
Clear xlDialogClear type_num
ColorPalette xlDialogColorPalette file_text
ColumnWidth xlDialogColumnWidth width_num, reference, standard, type_num, standard_num
Combination xlDialogCombination type_num
ConditionalFormatting xlDialogConditionalFormatting
Consolidate xlDialogConsolidate source_refs, function_num, top_row, left_col, create_links
CopyChart xlDialogCopyChart size_num
CopyPicture xlDialogCopyPicture appearance_num, size_num, type_num
CreateNames xlDialogCreateNames top, left, bottom, right
CreatePublisher xlDialogCreatePublisher file_text, appearance, size, formats
CustomizeToolbar xlDialogCustomizeToolbar category
CustomViews xlDialogCustomViews
DataDelete xlDialogDataDelete
DataLabel xlDialogDataLabel show_option, auto_text, show_key
DataSeries xlDialogDataSeries rowcol, type_num, date_num, step_value, stop_value, trend
DataValidation xlDialogDataValidation
DefineName xlDialogDefineName name_text, refers_to, macro_type, shortcut_text, hidden, category, local
DefineStyle xlDialogDefineStyle style_text, number, font, alignment, border, pattern, protection
DefineStyle xlDialogDefineStyle style_text, attribute_num, additional_def_args, ...
DeleteFormat xlDialogDeleteFormat format_text
DeleteName xlDialogDeleteName name_text
Demote xlDialogDemote row_col
Display xlDialogDisplay formulas, gridlines, headings, zeros, color_num, reserved, outline, page_breaks, object_num
Display xlDialogDisplay cell, formula, value, format, protection, names, precedents, dependents, note
EditboxProperties xlDialogEditboxProperties validation_num, multiline_logical, vscroll_logical, password_logical
EditColor xlDialogEditColor color_num, red_value, green_value, blue_value
EditDelete xlDialogEditDelete shift_num
EditionOptions xlDialogEditionOptions edition_type, edition_name, reference, option, appearance, size, formats
EditSeries xlDialogEditSeries series_num, name_ref, x_ref, y_ref, z_ref, plot_order
ErrorbarX xlDialogErrorbarX include, type, amount, minus
ErrorbarY xlDialogErrorbarY include, type, amount, minus
ExternalDataProperties xlDialogExternalDataProperties
Extract xlDialogExtract unique
FileDelete xlDialogFileDelete file_text
FileSharing xlDialogFileSharing
FillGroup xlDialogFillGroup type_num
FillWorkgroup xlDialogFillWorkgroup type_num
Filter xlDialogFilter
FilterAdvanced xlDialogFilterAdvanced operation, list_ref, criteria_ref, copy_ref, unique
FindFile xlDialogFindFile
Font xlDialogFont name_text, size_num
FontProperties xlDialogFontProperties font, font_style, size, strikethrough, superscript, subscript, outline, shadow, underline, color, normal, background, start_char, char_count
FormatAuto xlDialogFormatAuto format_num, number, font, alignment, border, pattern, width
FormatChart xlDialogFormatChart layer_num, view, overlap, angle, gap_width, gap_depth, chart_depth, doughnut_size, axis_num, drop, hilo, up_down, series_line, labels, vary
FormatCharttype xlDialogFormatCharttype apply_to, group_num, dimension, type_num
FormatFont xlDialogFormatFont color, backgd, apply, name_text, size_num, bold, italic, underline, strike, outline, shadow, object_id, start_num, char_num
FormatFont xlDialogFormatFont name_text, size_num, bold, italic, underline, strike, color, outline, shadow
FormatFont xlDialogFormatFont name_text, size_num, bold, italic, underline, strike, color, outline, shadow, object_id_text, start_num, char_num
FormatLegend xlDialogFormatLegend position_num
FormatMain xlDialogFormatMain type_num, view, overlap, gap_width, vary, drop, hilo, angle, gap_depth, chart_depth, up_down, series_line, labels, doughnut_size
FormatMove xlDialogFormatMove x_offset, y_offset, reference
FormatMove xlDialogFormatMove x_pos, y_pos
FormatMove xlDialogFormatMove explosion_num
FormatNumber xlDialogFormatNumber format_text
FormatOverlay xlDialogFormatOverlay type_num, view, overlap, gap_width, vary, drop, hilo, angle, series_dist, series_num, up_down, series_line, labels, doughnut_size
FormatSize xlDialogFormatSize width, height
FormatSize xlDialogFormatSize x_off, y_off, reference
FormatText xlDialogFormatText x_align, y_align, orient_num, auto_text, auto_size, show_key, show_value, add_indent
FormulaFind xlDialogFormulaFind text, in_num, at_num, by_num, dir_num, match_case, match_byte
FormulaGoto xlDialogFormulaGoto reference, corner
FormulaReplace xlDialogFormulaReplace find_text, replace_text, look_at, look_by, active_cell, match_case, match_byte
FunctionWizard xlDialogFunctionWizard
Gallery3dArea xlDialogGallery3dArea type_num
Gallery3dBar xlDialogGallery3dBar type_num
Gallery3dColumn xlDialogGallery3dColumn type_num
Gallery3dLine xlDialogGallery3dLine type_num
Gallery3dPie xlDialogGallery3dPie type_num
Gallery3dSurface xlDialogGallery3dSurface type_num
GalleryArea xlDialogGalleryArea type_num, delete_overlay
GalleryBar xlDialogGalleryBar type_num, delete_overlay
GalleryColumn xlDialogGalleryColumn type_num, delete_overlay
GalleryCustom xlDialogGalleryCustom name_text
GalleryDoughnut xlDialogGalleryDoughnut type_num, delete_overlay
GalleryLine xlDialogGalleryLine type_num, delete_overlay
GalleryPie xlDialogGalleryPie type_num, delete_overlay
GalleryRadar xlDialogGalleryRadar type_num, delete_overlay
GalleryScatter xlDialogGalleryScatter type_num, delete_overlay
GoalSeek xlDialogGoalSeek target_cell, target_value, variable_cell
Gridlines xlDialogGridlines x_major, x_minor, y_major, y_minor, z_major, z_minor, 2D_effect
ImportTextFile xlDialogImportTextFile
Insert xlDialogInsert shift_num
InsertHyperlink xlDialogInsertHyperlink
InsertNameLabel xlDialogInsertNameLabel
InsertObject xlDialogInsertObject object_class, file_name, link_logical, display_icon_logical, icon_file, icon_number, icon_label
InsertPicture xlDialogInsertPicture file_name, filter_number
InsertTitle xlDialogInsertTitle chart, y_primary, x_primary, y_secondary, x_secondary
LabelProperties xlDialogLabelProperties accel_text, accel2_text, 3d_shading
ListboxProperties xlDialogListboxProperties range, link, drop_size, multi_select, 3d_shading
MacroOptions xlDialogMacroOptions macro_name, description, menu_on, menu_text, shortcut_on, shortcut_key, function_category, status_bar_text, help_id, help_file
MailEditMailer xlDialogMailEditMailer to_recipients, cc_recipients, bcc_recipients, subject, enclosures, which_address
MailLogon xlDialogMailLogon name_text, password_text, download_logical
MailNextLetter xlDialogMailNextLetter
MainChart xlDialogMainChart type_num, stack, 100, vary, overlap, drop, hilo, overlap%, cluster, angle
MainChartType xlDialogMainChartType type_num
MenuEditor xlDialogMenuEditor
Move xlDialogMove x_pos, y_pos, window_text
New xlDialogNew type_num, xy_series, add_logical
NewWebQuery xlDialogNewWebQuery
Note xlDialogNote add_text, cell_ref, start_char, num_chars
ObjectProperties xlDialogObjectProperties placement_type, print_object
ObjectProtection xlDialogObjectProtection locked, lock_text
Open xlDialogOpen file_text, update_links, read_only, format, prot_pwd, write_res_pwd, ignore_rorec, file_origin, custom_delimit, add_logical, editable, file_access, notify_logical, converter
OpenLinks xlDialogOpenLinks document_text1, document_text2, ..., read_only, type_of_link
OpenMail xlDialogOpenMail subject, comments
OpenText xlDialogOpenText file_name, file_origin, start_row, file_type, text_qualifier, consecutive_delim, tab, semicolon, comma, space, other, other_char, field_info
OptionsCalculation xlDialogOptionsCalculation type_num, iter, max_num, max_change, update, precision, date_1904, calc_save, save_values
OptionsChart xlDialogOptionsChart display_blanks, plot_visible, size_with_window
OptionsEdit xlDialogOptionsEdit incell_edit, drag_drop, alert, entermove, fixed, decimals, copy_objects, update_links, move_direction, autocomplete, animations
OptionsGeneral xlDialogOptionsGeneral R1C1_mode, dde_on, sum_info, tips, recent_files, old_menus, user_info, font_name, font_size, default_location, alternate_location, sheet_num, enable_under
OptionsListsAdd xlDialogOptionsListsAdd string_array
OptionsListsAdd xlDialogOptionsListsAdd import_ref, by_row
OptionsME xlDialogOptionsME def_rtl_sheet, crsr_mvmt, show_ctrl_char, gui_lang
OptionsTransition xlDialogOptionsTransition menu_key, menu_key_action, nav_keys, trans_eval, trans_entry
OptionsView xlDialogOptionsView formula, status, notes, show_info, object_num, page_breaks, formulas, gridlines, color_num, headers, outline, zeros, hor_scroll, vert_scroll, sheet_tabs
Outline xlDialogOutline auto_styles, row_dir, col_dir, create_apply
Overlay xlDialogOverlay type_num, stack, 100, vary, overlap, drop, hilo, overlap%, cluster, angle, series_num, auto
OverlayChartType xlDialogOverlayChartType type_num
PageSetup xlDialogPageSetup head, foot, left, right, top, bot, hdng, grid, h_cntr, v_cntr, orient, paper_size, scale, pg_num, pg_order, bw_cells, quality, head_margin, foot_margin, notes, draft
PageSetup xlDialogPageSetup head, foot, left, right, top, bot, size, h_cntr, v_cntr, orient, paper_size, scale, pg_num, bw_chart, quality, head_margin, foot_margin, draft
PageSetup xlDialogPageSetup head, foot, left, right, top, bot, orient, paper_size, scale, quality, head_margin, foot_margin, pg_num
Parse xlDialogParse parse_text, destination_ref
PasteNames xlDialogPasteNames
PasteSpecial xlDialogPasteSpecial paste_num, operation_num, skip_blanks, transpose
PasteSpecial xlDialogPasteSpecial rowcol, titles, categories, replace, series
PasteSpecial xlDialogPasteSpecial paste_num
PasteSpecial xlDialogPasteSpecial format_text, pastelink_logical, display_icon_logical, icon_file, icon_number, icon_label
Patterns xlDialogPatterns apattern, afore, aback, newui
Patterns xlDialogPatterns lauto, lstyle, lcolor, lwt, hwidth, hlength, htype
Patterns xlDialogPatterns bauto, bstyle, bcolor, bwt, shadow, aauto, apattern, afore, aback, rounded, newui
Patterns xlDialogPatterns bauto, bstyle, bcolor, bwt, shadow, aauto, apattern, afore, aback, invert, apply, newfill
Patterns xlDialogPatterns lauto, lstyle, lcolor, lwt, tmajor, tminor, tlabel
Patterns xlDialogPatterns lauto, lstyle, lcolor, lwt, apply, smooth
Patterns xlDialogPatterns lauto, lstyle, lcolor, lwt, mauto, mstyle, mfore, mback, apply, smooth
Patterns xlDialogPatterns type, picture_units, apply
Phonetic xlDialogPhonetic
PivotCalculatedField xlDialogPivotCalculatedField

PivotCalculatedItem xlDialogPivotCalculatedItem
PivotClientServerSet xlDialogPivotClientServerSet
PivotFieldGroup xlDialogPivotFieldGroup start, end, by, periods
PivotFieldProperties xlDialogPivotFieldProperties name, pivot_field_name, new_name, orientation, function, formats
PivotFieldUngroup xlDialogPivotFieldUngroup
PivotShowPages xlDialogPivotShowPages name, page_field
PivotSolveOrder xlDialogPivotSolveOrder
PivotTableOptions xlDialogPivotTableOptions
PivotTableWizard xlDialogPivotTableWizard type, source, destination, name, row_grand, col_grand, save_data, apply_auto_format, auto_page, reserved
Placement xlDialogPlacement placement_type
Print xlDialogPrint range_num, from, to, copies, draft, preview, print_what, color, feed, quality, y_resolution, selection, printer_text, print_to_file, collate
PrinterSetup xlDialogPrinterSetup printer_text
PrintPreview xlDialogPrintPreview
Promote xlDialogPromote rowcol
Properties xlDialogProperties title, subject, author, keywords, comments
ProtectDocument xlDialogProtectDocument contents, windows, password, objects, scenarios
ProtectSharing xlDialogProtectSharing
PublishAsWebPage xlDialogPublishAsWebPage
PushbuttonProperties xlDialogPushbuttonProperties default_logical, cancel_logical, dismiss_logical, help_logical, accel_text, accel_text2
ReplaceFont xlDialogReplaceFont font_num, name_text, size_num, bold, italic, underline, strike, color, outline, shadow
RoutingSlip xlDialogRoutingSlip recipients, subject, message, route_num, return_logical, status_logical
RowHeight xlDialogRowHeight height_num, reference, standard_height, type_num
Run xlDialogRun reference, step
SaveAs xlDialogSaveAs document_text, type_num, prot_pwd, backup, write_res_pwd, read_only_rec
SaveCopyAs xlDialogSaveCopyAs document_text
SaveNewObject xlDialogSaveNewObject
SaveWorkbook xlDialogSaveWorkbook document_text, type_num, prot_pwd, backup, write_res_pwd, read_only_rec
SaveWorkspace xlDialogSaveWorkspace name_text
Scale xlDialogScale cross, cat_labels, cat_marks, between, max, reverse
Scale xlDialogScale min_num, max_num, major, minor, cross, logarithmic, reverse, max
Scale xlDialogScale cat_labels, cat_marks, reverse, between
Scale xlDialogScale series_labels, series_marks, reverse
Scale xlDialogScale min_num, max_num, major, minor, cross, logarithmic, reverse, min
ScenarioAdd xlDialogScenarioAdd scen_name, value_array, changing_ref, scen_comment, locked, hidden
ScenarioCells xlDialogScenarioCells changing_ref
ScenarioEdit xlDialogScenarioEdit scen_name, new_scenname, value_array, changing_ref, scen_comment, locked, hidden
ScenarioMerge xlDialogScenarioMerge source_file
ScenarioSummary xlDialogScenarioSummary result_ref, report_type
ScrollbarProperties xlDialogScrollbarProperties value, min, max, inc, page, link, 3d_shading
SelectSpecial xlDialogSelectSpecial type_num, value_type, levels
SendMail xlDialogSendMail recipients, subject, return_receipt
SeriesAxes xlDialogSeriesAxes axis_num
SeriesOptions xlDialogSeriesOptions
SeriesOrder xlDialogSeriesOrder chart_num, old_series_num, new_series_num
SeriesShape xlDialogSeriesShape
SeriesX xlDialogSeriesX x_ref
SeriesY xlDialogSeriesY name_ref, y_ref
SetBackgroundPicture xlDialogSetBackgroundPicture
SetPrintTitles xlDialogSetPrintTitles titles_for_cols_ref, titles_for_rows_ref
SetUpdateStatus xlDialogSetUpdateStatus link_text, status, type_of_link
ShowDetail xlDialogShowDetail rowcol, rowcol_num, expand, show_field
ShowToolbar xlDialogShowToolbar bar_id, visible, dock, x_pos, y_pos, width, protect, tool_tips, large_buttons, color_buttons
Size xlDialogSize width, height, window_text
Sort xlDialogSort orientation, key1, order1, key2, order2, key3, order3, header, custom, case
Sort xlDialogSort orientation, key1, order1, type, custom
SortSpecial xlDialogSortSpecial sort_by, method, key1, order1, key2, order2, key3, order3, header, order, case
Split xlDialogSplit col_split, row_split
StandardFont xlDialogStandardFont name_text, size_num, bold, italic, underline, strike, color, outline, shadow
StandardWidth xlDialogStandardWidth standard_num
Style xlDialogStyle bold, italic
SubscribeTo xlDialogSubscribeTo file_text, format_num
SubtotalCreate xlDialogSubtotalCreate at_change_in, function_num, total, replace, pagebreaks, summary_below
SummaryInfo xlDialogSummaryInfo title, subject, author, keywords, comments
Table xlDialogTable row_ref, column_ref
TabOrder xlDialogTabOrder
TextToColumns xlDialogTextToColumns destination_ref, data_type, text_delim, consecutive_delim, tab, semicolon, comma, space, other, other_char, field_info
Unhide xlDialogUnhide window_text
UpdateLink xlDialogUpdateLink link_text, type_of_link
VbaInsertFile xlDialogVbaInsertFile filename_text
VbaMakeAddIn xlDialogVbaMakeAddIn
VbaProcedureDefinition xlDialogVbaProcedureDefinition
View3d xlDialogView3d elevation, perspective, rotation, axes, height%, autoscale
WebOptionsEncoding xlDialogWebOptionsEncoding
WebOptionsFiles xlDialogWebOptionsFiles
WebOptionsFonts xlDialogWebOptionsFonts
WebOptionsGeneral xlDialogWebOptionsGeneral
WebOptionsPictures xlDialogWebOptionsPictures
WindowMove xlDialogWindowMove x_pos, y_pos, window_text
WindowSize xlDialogWindowSize width, height, window_text
WorkbookAdd xlDialogWorkbookAdd name_array, dest_book, position_num
WorkbookCopy xlDialogWorkbookCopy name_array, dest_book, position_num
WorkbookInsert xlDialogWorkbookInsert type_num
WorkbookMove xlDialogWorkbookMove name_array, dest_book, position_num
WorkbookName xlDialogWorkbookName oldname_text, newname_text
WorkbookNew xlDialogWorkbookNew
WorkbookOptions xlDialogWorkbookOptions sheet_name, bound_logical, new_name
WorkbookProtect xlDialogWorkbookProtect structure, windows, password
WorkbookTabSplit xlDialogWorkbookTabSplit ratio_num
WorkbookUnhide xlDialogWorkbookUnhide sheet_text
Workgroup xlDialogWorkgroup name_array
Workspace xlDialogWorkspace fixed, decimals, r1c1, scroll, status, formula, menu_key, remote, entermove, underlines, tools, notes, nav_keys, menu_key_action, drag_drop, show_info
Zoom xlDialogZoom magnification
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,693
Members
448,979
Latest member
DET4492

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