R
Rayo K
I just added a variable to a sub in a module. It used to receive an integer.
Now it receives an integer and a string.
Excel won't let me pass the string to it. I don't know what is going on.
Here is my sub first line:
Public Sub ShiftNewMonth(MachineType As Integer, MachineName As String)
....
End Sub
I call this sub from a worksheet like this:
Private Sub NewMonthButton_Click()
Dim shtName As String
shtName = "Corrugator"
ShiftNewMonth (1 , shtName)
End Sub
Excel wants me to put an equal sign at the end of "ShiftNewMonth (1 ,
shtName)" as if it's a Function.
If I remove the string and say: ShiftNewMonth (1), it lets it go, but then
it doesn't work because the module is expecting a string. ?????
Now it receives an integer and a string.
Excel won't let me pass the string to it. I don't know what is going on.
Here is my sub first line:
Public Sub ShiftNewMonth(MachineType As Integer, MachineName As String)
....
End Sub
I call this sub from a worksheet like this:
Private Sub NewMonthButton_Click()
Dim shtName As String
shtName = "Corrugator"
ShiftNewMonth (1 , shtName)
End Sub
Excel wants me to put an equal sign at the end of "ShiftNewMonth (1 ,
shtName)" as if it's a Function.
If I remove the string and say: ShiftNewMonth (1), it lets it go, but then
it doesn't work because the module is expecting a string. ?????