VBA/Excel/Access/Word/Excel/Workbook SaveAs — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
Admin (обсуждение | вклад) м (1 версия) |
(нет различий)
|
Текущая версия на 12:47, 26 мая 2010
Содержание
- 1 Saves the open workbook named Schedule.xls under the name Building Schedule.xls in the folder named \\server2\Public using the "Microsoft Excel format (from Excel 2003):
- 2 Save the active workbook
- 3 Saving All Open Workbooks
- 4 Saving a Workbook That Has Already Been Saved
- 5 xlExcelaves Document As An Excel workbook for Excel versions 95 and later
- 6 xlHtml Saves Document As A web page
- 7 xlNormal: Saves Document As A normal workbook
- 8 xlTemplate Saves Document As A template
- 9 xlWebArchive Saves Document As A single file web page
- 10 xlXMLSpreadsheet: Saves Document As An XML spreadsheet
Saves the open workbook named Schedule.xls under the name Building Schedule.xls in the folder named \\server2\Public using the "Microsoft Excel format (from Excel 2003):
Sub save()
ActiveWorkbook.SaveAs Filename:="\\server2\Public\Building Schedule.xls", _
FileFormat:=xlExcel9795
End Sub
Save the active workbook
Sub save()
ActiveWorkbook.SaveAs FileName:="Salaries.xls"
End Sub
Saving All Open Workbooks
Sub Save_All_Workbooks()
Dim myWorkbook As Workbook
For Each myWorkbook In Workbooks
myWorkbook.Save
Next myWorkbook
End Sub
Saving a Workbook That Has Already Been Saved
Sub save()
Workbooks("Data Book.doc").Save
End Sub
xlExcelaves Document As An Excel workbook for Excel versions 95 and later
Sub save()
ActiveWorkbook.SaveAs Filename:="\\server2\Public\Building Schedule.xls", _
FileFormat:=xlExcel9795
xlHtml Saves Document As A web page
Sub save()
ActiveWorkbook.SaveAs Filename:="\\server2\Public\Building Schedule.xls", _
FileFormat:=xlHtml
End Sub
xlNormal: Saves Document As A normal workbook
Sub save()
ActiveWorkbook.SaveAs Filename:="\\server2\Public\Building Schedule.xls", _
FileFormat:=xlNormal
End Sub
xlTemplate Saves Document As A template
Sub save()
ActiveWorkbook.SaveAs Filename:="\\server2\Public\Building Schedule.xls", _
FileFormat:=xlTemplate
End Sub
xlWebArchive Saves Document As A single file web page
Sub save()
ActiveWorkbook.SaveAs Filename:="\\server2\Public\Building Schedule.xls", _
FileFormat:=xlWebArchive
End Sub
xlXMLSpreadsheet: Saves Document As An XML spreadsheet
Sub save()
ActiveWorkbook.SaveAs Filename:="\\server2\Public\Building Schedule.xls", _
FileFormat:=xlXMLSpreadsheet
End Sub