Карлос, извините за негатив. Он не позволит мне снять его. Я новичок здесь, и я не уверен, как это происходит.
Я отправляю вам код:
Set WshShell = WScript.CreateObject("WScript.Shell")
Set fso = CreateObject("Scripting.FileSystemObject")
Route=(fso.GetParentFolderName(WScript.ScriptFullName))&"\" ' Route = folder
Set objExcel1 = createobject("Excel.application") 'we create Excel object
objExcel1.Visible = True 'we make it visible
Set objWorkbook = objExcel1.Workbooks.open (Route&"Book.xlsx") 'we open it
Set objSheet = objExcel1.ActiveWorkbook.Worksheets(1) 'we select the sheet num 1
value="Hello" ' Hello is an example, is the value that we are going to look for
yy=30 'We assume we have a sheet of 30 rows
xx=40 'and 40 columns
For y1=1 to yy
cc=0 'control variable
For x1=1 to xx
if objExcel1.Cells(y1, x1).Value=value then cc=1 :exit for '
next
if cc=1 then exit for 'cc=1 we leave the second loop
next
If cc=1 then Msgbox " Found value in Column="&x1 &" Row="&y1
if cc=0 then Msgbox "Value not found"
msgbox "End",4096