Xml 我需要宏提示我根据图纸名称选择图纸
我正在运行以下宏,但希望它具有更多功能。此电子表格用于维护客户和跟踪多个州内的销售价值。我在每个州都有一个工作手册标签。我希望宏提示我输入当前宏中数据的状态。我是否可以在此宏中添加一些内容,以便它首先提示我根据图纸名称选择图纸Xml 我需要宏提示我根据图纸名称选择图纸,xml,excel,worksheet,vba,Xml,Excel,Worksheet,Vba,我正在运行以下宏,但希望它具有更多功能。此电子表格用于维护客户和跟踪多个州内的销售价值。我在每个州都有一个工作手册标签。我希望宏提示我输入当前宏中数据的状态。我是否可以在此宏中添加一些内容,以便它首先提示我根据图纸名称选择图纸 Sub TestMacro() Dim dblRow As Double, dtDate As Date, strCustomer As String Dim strAddress As String, strZip As String, strEst As String
Sub TestMacro()
Dim dblRow As Double, dtDate As Date, strCustomer As String
Dim strAddress As String, strZip As String, strEst As String
dblRow = InputBox("What Row to Enter On")
dtDate = InputBox("Date", , Date)
strCustomer = InputBox("Customer")
strAddress = InputBox("Address")
strZip = InputBox("Zip Code")
strEst = InputBox("Estimated Value")
Range("A" & dblRow).Value = dtDate
Range("B" & dblRow).Value = strCustomer
Range("C" & dblRow).Value = strAddress
Range("D" & dblRow).Value = strZip
Range("E" & dblRow).Value = strEst
End Sub
我想出来了。这是我的代码的工作结果
Sub EnterContact()
Dim lastrow As Long, strCust As String, strAddress As String
Dim strTown As String, strZip As String, strPhone As String
Dim strFax As String, strEmail As String, strContact As String
Dim strPrior As String, strOrg As String, strProj As String
With Sheets("Oregon")
lastrow = .Range("A" & .Rows.Count).End(xlUp).Row + 1
strCust = InputBox("Enter Customer")
strAddress = InputBox("Enter Address")
strTown = InputBox("Enter Town")
strZip = InputBox("Enter Zip Code")
strPhone = InputBox("Enter Phone Number")
strFax = InputBox("Enter Fax Number")
strEmail = InputBox("Enter Email Address")
strContact = InputBox("Enter Contact Name")
strPrior = InputBox("Enter Priority Level")
strOrg = InputBox("Enter Organization")
strProj = InputBox("Enter Projected Dollar Amount")
Range("A" & lastrow).Value = strCust
Range("B" & lastrow).Value = strAddress
Range("C" & lastrow).Value = strTown
Range("D" & lastrow).Value = strZip
Range("E" & lastrow).Value = strPhone
Range("F" & lastrow).Value = strFax
Range("G" & lastrow).Value = strEmail
Range("H" & lastrow).Value = strContact
Range("I" & lastrow).Value = strPrior
Range("J" & lastrow).Value = strOrg
Range("K" & lastrow).Value = strProj
Dim LRow As Long
'Find last row in Column A with content
LRow = Cells(Rows.Count, 1).End(xlUp).Offset(0, 0).Row
Rows("5:" & LRow).Sort Key1:=.Range("C3"), _
Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, _
Orientation:=xlTopToBottom
End With
End Sub
我还忘了补充一点,我希望dblRow=InputBox(“输入的行”)自动选择下一个不包含数据的可用行。