prueba asi:
Código PHP:
variable = Text1.Text
cmmm.ActiveConnection = cnn
cmmm.CommandType = adCmdText
cmmm.CommandText = "INSERT INTO " & variable & " & _
"(Gastopor, Montopor, Fechadelgasto, Motivodelgasto) " & _
"VALUES ('" & _
Text3 & "', '" & Text4 & "', '" & Text5 & "', '" & Text6 & "')"
cmmm.Execute
si no funciona ponle a variable de esta forma:
Código PHP:
variable = Chr(39) & variable & Chr(39)
Saludos.