E' possibile inviare da visual basic delle variabili ad una pagina web tramite post? In modo da poterle ricavare poi nella pagina con $GET.. In sostanza io mi ristrovo a programmare con visual basic e php. Il mio progetto è questo: un utente compilando dei text in un form (vb) inserisce determinati valori nelle celle di un file excel. E fin qui ce l'ho. Mò il fatto è che io vorrei dare quei valori anche a mysql in modo da avere anche database remoto. Come faccio?
Il codice della mia applicazione è questo:
codice:
Dim appExcel As New Excel.Application
Dim cartExcel As Excel.Workbook
Dim foglioExcel As Excel.Worksheet
Dim riga As Integer
Private Sub Command1_Click()
Set foglioExcel = Excel.Worksheets.Item(1)
foglioExcel.Activate
If appExcel.ActiveWindow Is Nothing Then
MsgBox "Nessuna finestra è attiva"
End If
riga = Val(Text11.Text)
foglioExcel.Range("A" & riga).Value = Text1.Text
foglioExcel.Range("B" & riga).Value = Text2.Text
foglioExcel.Range("C" & riga).Value = Text3.Text
foglioExcel.Range("D" & riga).Value = Text4.Text
foglioExcel.Range("E" & riga).Value = Text5.Text
foglioExcel.Range("F" & riga).Value = Text6.Text
foglioExcel.Range("G" & riga).Value = Text7.Text
foglioExcel.Range("H" & riga).Value = Text8.Text
foglioExcel.Range("I" & riga).Value = Text9.Text
foglioExcel.Range("J" & riga).Value = Text10.Text
End Sub
Private Sub Command2_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text10.Text = ""
Text11.Text = ""
End Sub
Private Sub Form_Load()
appExcel.Visible = True
Set cartExcel = Excel.Workbooks.Open("C:\Cartel1.xls")
End Sub
Private Sub Text6_Change()
Text7.Text = Val(Text5.Text) - (Val(Text5.Text) * Val(Text6.Text) / 100)
End Sub
Private Sub Text8_Change()
Text9.Text = Val(Text7.Text) + (Val(Text7.Text) * Val(Text8.Text) / 100)
End Sub
Altra questione, per fare la % di un valore, basta che faccio:
valore iniziale - o + (valore iniziale * valore della percentuale /100)
no?
Grazie 1000