Я строю программу в VBA, которая будет в основном вставлять текст в электронную таблицу, используя excel для VBA. Следующая ошибка заявил случаться:Excel VBA - Ошибка использования метода Range.Find
error on the xlvalues on this line: FoundCell = oSheet.Range("A:A").Find(What:=currentDay, LookIn:=xlvalues)
error is xlValues is not declared or may not be accessible due to its protection level
Код:
' Find Current Day In Excel Sheet
Dim currentDay As String = String.Format(DateTime.Now.ToString("dd/MM/yyyy")) ' Todays Date In Format To Search Spreadsheet
Dim FoundCell As Excel.Range
FoundCell = oSheet.Range("A:A").Find(What:=currentDay, LookIn:=xlvalues)
If Not FoundCell Is Nothing Then
MsgBox(currentDay & " Found In Row: " & FoundCell.Row)
Else
MsgBox(currentDay & " Not Found In Sheet " & oSheet.Name)
End If
Любая помощь будет много appricated,
Спасибо, Шон
Насколько я знаю, это может быть связано с импортом excel, что его следует делить как? – MayContainVennom