I have a Visio file in which I wrote VBA code. Earlier I was giving input manually. Now I want to give the input using an excel file. The input is present in the first column of the excel file. The following code is not giving the desired result.
Dim objXLApp As Object Dim objXLBook As Object Dim strArray As Variant Dim TotalRows As Long Set objXLApp = CreateObject("Excel.Application") Set objXLBook = objXLApp.Workbooks.Open("File location") Dim x As Variant x = objXLBook.Sheet1.Range("A1:A10") Debug.Print x(1, 1)