I am trying to make a button that calls a sub in VBA with parameters.
When I assign this macro to the button:
KrakenBook.xlsm!Sheet4.CreateDoublePercentageOrder "LTCUSD", 10, 10, .04, .04
When I try to assign it like this (the same thing but with apostrophes around it):
'KrakenBook.xlsm!Sheet4.CreateDoublePercentageOrder "LTCUSD", 10, 10, .04, .04'
No idea why. And no, I triple-checked and I do NOT have brackets in the directory of my xlsm file.
Here's the code of the sub I'm trying to call:
Public Sub CreateDoublePercentageOrder(assetPair As String, buyPercentage As Double, sellPercentage As Double, buyVolume As Double, sellVolume As Double)
Dim result As String
Dim success As Boolean
Dim description As String
Dim buyTxid As String
Dim sellTxid As String
result = krakenOrderingSystem.AddDoublePercentageOrder(assetPair, buyPercentage, sellPercentage, buyVolume, sellVolume, buyTxid, sellTxid, description, success)
If (success) Then
MsgBox buyTxid + " " + sellTxid + vbCrLf + description + vbCrLf + result
Else
MsgBox result
End If
End Sub