1 / 11
文档名称:

MicrosoftWord-vba代码.pdf

格式:pdf   大小:202KB   页数:11页
下载后只包含 1 个 PDF 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

文档介绍:Evaluation Warning : The document was created with Spire.PDF .

Sub SayHello()
xt = ""
.FirstPage.RightHeader.Text = ""
.FirstPage.LeftFooter.Text = ""
.FirstPage.CenterFooter.Text = ""
.FirstPage.RightFooter.Text = ""
End With
End Sub






Sub Macro1()
'
' Macro1 Macro
'

'
Range("B1").Select
ActiveCell.FormulaR1C1 = "Jan"
Range("C1").Select
ActiveCell.FormulaR1C1 = "Feb"
Range("D1").Select
ActiveCell.FormulaR1C1 = "Mac"
Range("E1").Select
ActiveCell.FormulaR1C1 = "Apri"
Range("F1").SelectActiveCell.FormulaR1C1 = "May"
Range("G1").Select
ActiveCell.FormulaR1C1 = "June"
Range("B1").Select
End Sub
Sub Macro2()
'
' Macro2 Macro
'

'
ActiveCell.FormulaR1C1 = "jan"
ActiveCell.Offset(0, 1).Range("A1").Select
ActiveCell.FormulaR1C1 = "feb"
ActiveCell.Offset(0, 1).Range("A1").Select
ActiveCell.FormulaR1C1 = "mac"
ActiveCell.Offset(0, 1).Range("A1").Select
ActiveCell.FormulaR1C1 = "apri"
ActiveCell.Offset(0, 1).Range("A1").Select
ActiveCell.FormulaR1C1 = "may"
ActiveCell.Offset(0, 1).Range("A1").Select
ActiveCell.FormulaR1C1 = "june"
ActiveCell.Offset(0, -5).Range("A1").Select
End Sub



Sub macro3()
ActiveCell.Offset(0, 0) = "Jan"
ActiveCell.Offset(0, 1) = "Feb"
ActiveCell.Offset(0, 2) = "Mar"
ActiveCell.Offset(0, 3) = "Apr"
ActiveCell.Offset(0, 4) = "May"
ActiveCell.Offset(0, 5) = "Jun"
End Sub




Sub showvalue()
MsgBox Worksheets("sheet1").Range("A1").Value
End SubSub changevalue()
Worksheets("sheet1").Range("A1").Value = 123.45
End Sub







1. 先确保安装时选择了 VBA 帮助文件(采用自定义安装)
2. 在"Microsoft Visual Basic' 窗口中-->( 菜单)帮助-->Microsoft Visual Basic 帮助
-->( 打开'Excel 帮助'对话框-->" 搜索

分享好友

预览全文

MicrosoftWord-vba代码.pdf

上传人:gorynich 2022/5/18 文件大小:202 KB

下载得到文件列表

MicrosoftWord-vba代码.pdf

相关文档