Sto cercando di capire perché VBA
restituisce un errore (Compile error: Expected: =)
quando chiamo un Sub
e lo fornisco con più parametri. Qualsiasi aiuto sarebbe molto apprezzato.Errore di ritorno VBA quando si chiama un Sub con più parametri
Sub customerController(cleanStructure As Boolean, firstCol As Integer, latCol As Integer, _
lngCol As Integer, Optional startRow As Long, Optional endRow As Long)
Dim i As Long, j As Long, n As Long
If (cleanStructure = False) Then
'customer data type
If (startRow = "") Then i = 1
If (endRow = "") Then j = countRows
For n = i To j - i + 1
generateURL(n, firstCol)
newReadXMLData (url)
ActiveSheet.Cells(i, latCol).Value = lat
ActiveSheet.Cells(i, lngCol).Value = lng
Next
End If
End Sub
Il Sub
che sto chiamando richiede due parametri:
Sub generateURL(row As Long, column As Long)
puoi pubblicare il codice per come lo chiami? Hai postato customerController ma fai riferimento a readAddress? – InContext
Oops, ho inserito la funzione sbagliata nell'ultima riga. Ottengo l'errore nella riga 'generateURL (n, firstcol)'. – MartinUKPL
cambia 'generateURL (n, firstCol)' a 'generateURL n, firstCol' –