salut
je veux transformer ce code ecrit en VBA à un code écrit en VBS pour un formulaire outlook car je suis débutant dans les 2 codes
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
 
 
Private Sub CommandButton1_Click()
Dim xlApp As New Excel.Application
Dim xlSheet As Excel.Worksheet
Dim xlBook As Excel.Workbook
Dim colonne As String
Set xlApp = CreateObject("Excel.Application")
Set xlBook = xlApp.Workbooks.Open("F:\youness\segment_ref_com_20080911.xls")
Set xlSheet = xlBook.ActiveSheet
colonne = Me.TextBox2.Value
Me.TextBox2.Value = xlSheet.Evaluate("VLOOKUP(""" & colonne & """,B:K,1,0)")
Me.TextBox3.Value = xlSheet.Evaluate("VLOOKUP(""" & colonne & """,B:K,4,0)")
End Sub