Hi,
I am trying to create an input box that uses a variable in the prompt. The input box requests the charge rate for a contract that is not in the list. I already have the code, description and exchange information.
The code I have used is:
'If not found then add contract details to list and request currency and rate information
If ActiveCell.Value = "" Then
ActiveCell.Value = ContractCode
ActiveCell.Offset(0, 1).Value = Exchange
ActiveCell.Offset(0, 2).Value = ContractDesc
ExRequest = InputBox("Please enter the execution rate for " & ContractDesc&, "Execution Rate")
'if no response set rate to 0
If ExRequest = "" Then
ExMsg = MsgBox("No rate provided. Execution rate will default to 0!")
ExRate = 0
Else: ExRate = ExRequest
End If
ActiveCell.Offset(0, 4).Value = ExRate
Unfortunately, the code I used returns a compile error: "Type-declaration character does not match declared data type". I have declared the variable as a string using Dim ContractDesc As String, but that hasn't resolved the issue.
I'm sure its something simple and would appreciate any help.
Many Thanks
Ali.
I am trying to create an input box that uses a variable in the prompt. The input box requests the charge rate for a contract that is not in the list. I already have the code, description and exchange information.
The code I have used is:
'If not found then add contract details to list and request currency and rate information
If ActiveCell.Value = "" Then
ActiveCell.Value = ContractCode
ActiveCell.Offset(0, 1).Value = Exchange
ActiveCell.Offset(0, 2).Value = ContractDesc
ExRequest = InputBox("Please enter the execution rate for " & ContractDesc&, "Execution Rate")
'if no response set rate to 0
If ExRequest = "" Then
ExMsg = MsgBox("No rate provided. Execution rate will default to 0!")
ExRate = 0
Else: ExRate = ExRequest
End If
ActiveCell.Offset(0, 4).Value = ExRate
Unfortunately, the code I used returns a compile error: "Type-declaration character does not match declared data type". I have declared the variable as a string using Dim ContractDesc As String, but that hasn't resolved the issue.
I'm sure its something simple and would appreciate any help.
Many Thanks
Ali.