|
楼主 |
发表于 2019-11-28 08:32
|
显示全部楼层
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
附上代码,请老师帮忙添加,多谢!
With .Controls.Add(1) '括弧内为菜单样式
.BeginGroup = True
.Caption = "1.转至上报信息车辆销售收入"
.FaceId = 9590
str1 = Target.Offset(0, -9)
str3 = Target.Offset(0, -2)
str4 = Target.Offset(0, -3)
str8 = Target.Offset(0, -1) '内报科目
str9 = Target.Offset(0, -4) '金额
str10 = "调整至上报信息车辆销售收入"
str11 = "项目间调整"
str12 = "a1.1.1----销售收入"
Cancel = True '无此函数,双击后单元格进入编辑状态
UserForm3.TextBox64 = str1
UserForm3.TextBox65 = str3
UserForm3.TextBox66 = str4
UserForm3.TextBox37 = str10
UserForm3.ComboBox15 = str8
UserForm3.TextBox41 = str9
UserForm3.TextBox62 = str9
UserForm3.ComboBox16 = str12
UserForm3.ComboBox22 = str11
UserForm3.ComboBox23 = str11
.OnAction = "openformtz1"
End With
With .Controls.Add(1)
.Caption = "2.调拨收入"
.FaceId = 9591
.OnAction = "openformtz1"
str1 = Target.Offset(0, -9)
str3 = Target.Offset(0, -2)
str4 = Target.Offset(0, -3)
str8 = Target.Offset(0, -1) '内报科目
str9 = Target.Offset(0, -4) '金额
str10 = "调整至上报信息车辆销售收入"
str11 = "项目间调整"
str13 = "a1.1.2----调拨销售收入"
Cancel = True '无此函数,双击后单元格进入编辑状态
UserForm3.TextBox64 = str1
UserForm3.TextBox65 = str3
UserForm3.TextBox66 = str4
UserForm3.TextBox37 = str10
UserForm3.ComboBox15 = str8
UserForm3.TextBox41 = str9
UserForm3.TextBox62 = str9
UserForm3.ComboBox16 = str13
UserForm3.ComboBox22 = str11
UserForm3.ComboBox23 = str11
End With |
|