The watch window is showing passed and local variables as being out of scope when they should be in scope.
I have placed breakpoints in the code and simplified it but it still occurs.
Also I do not see the myTest sub in the categories window even though it is in the edit window.
Sub Main
myTest(1,0,0,“Horiz”)
End Sub
Sub myTest (sheetNum As Long, startRowNum As Long, startColNum As Long, direction As String)
’ Dim Doc As Object 'hold document reference
’ Dim Sheet As Object 'hold sheet reference
’ Dim rowCell As Object 'holds the cell in the row that is being checked for an empty value
’ Dim colCell As Object 'holds the cell in the column that is being checked for an empty value
’ Dim rowSize As Long
’ Dim colSize As Long
’ Dim colNum As Long
’ Dim rowNum As Long
’ Dim longestRow As Long
’ Dim longestCol As Long
’ Doc = ThisComponent 'references the document that the macro is part of
REM Sheet = Doc.Sheets(sheetNum) 'references the sheet
’ rowSize = 0
’ colSize = 0 'these both start at 0 because arrays start at 0
’ colNum = 10 'set the column and row numbers to the initial value
’ rowNum = 10
’ longestRow = 0
’ longestCol = 0
dim i,j,cnt
for cnt = 1 To 10
i = i + 1
j = i + 1
next cnt
End Sub