Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all,
Is it possible to view line numbers of a VBA subroutine on screen and in printing? Thanks a lot. Frederick Chow Hong Kong. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
"Microsoft Forum" wrote...
Is it possible to view line numbers of a VBA subroutine on screen and in printing? Thanks a lot. Not in Office's Visual Basic Editor. If you want to have positional indicators in code that you can find in the Visual Basic Editor, then you'd need to add comments to your code that provide such. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Frederick,
Have a look at this add in http://www.mztools.com/ Regards Neil "Microsoft Forum" wrote in message ... Hi all, Is it possible to view line numbers of a VBA subroutine on screen and in printing? Thanks a lot. Frederick Chow Hong Kong. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Frederick,
Sub test() 1 Dim v 10 v = 2 20 If v = 4 Then 30 MsgBox "Bye" 40 Exit Sub 50 End If 60 v = 4 70 GoTo 20 End Sub Try pasting old code without numbers to Col B on your worksheet, put appropriate numbers in Col A, paste all back to the vbe. Seems if you number some lines, any lines that are not numbered are ignored, including Dim statements. Regards, Peter "Microsoft Forum" wrote in message ... Hi all, Is it possible to view line numbers of a VBA subroutine on screen and in printing? Thanks a lot. Frederick Chow Hong Kong. |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub test()
1 Dim v 10 v = 2 20 If v = 4 Then MsgBox "Bye" 40 Exit Sub 50 End If 60 v = 4 70 GoTo 20 End Sub worked fine and the msgbox line is not numbered. -- Regards, Tom Ogilvy "Peter T" <peter_t@discussions wrote in message ... Hi Frederick, Sub test() 1 Dim v 10 v = 2 20 If v = 4 Then 30 MsgBox "Bye" 40 Exit Sub 50 End If 60 v = 4 70 GoTo 20 End Sub Try pasting old code without numbers to Col B on your worksheet, put appropriate numbers in Col A, paste all back to the vbe. Seems if you number some lines, any lines that are not numbered are ignored, including Dim statements. Regards, Peter "Microsoft Forum" wrote in message ... Hi all, Is it possible to view line numbers of a VBA subroutine on screen and in printing? Thanks a lot. Frederick Chow Hong Kong. |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Tom,
worked fine and the msgbox line is not numbered. So it does. I was sure in previous testing unnumbered lines were ignored, as if they were commented. Normally I would have to put this down to loosing my senses, but in this case I'll blame it on a late night! FWIW another observation, line numbers do not need to be in any sort of order. regards, Peter "Tom Ogilvy" wrote in message ... Sub test() 1 Dim v 10 v = 2 20 If v = 4 Then MsgBox "Bye" 40 Exit Sub 50 End If 60 v = 4 70 GoTo 20 End Sub worked fine and the msgbox line is not numbered. -- Regards, Tom Ogilvy "Peter T" <peter_t@discussions wrote in message ... Hi Frederick, Sub test() 1 Dim v 10 v = 2 20 If v = 4 Then 30 MsgBox "Bye" 40 Exit Sub 50 End If 60 v = 4 70 GoTo 20 End Sub Try pasting old code without numbers to Col B on your worksheet, put appropriate numbers in Col A, paste all back to the vbe. Seems if you number some lines, any lines that are not numbered are ignored, including Dim statements. Regards, Peter "Microsoft Forum" wrote in message ... Hi all, Is it possible to view line numbers of a VBA subroutine on screen and in printing? Thanks a lot. Frederick Chow Hong Kong. |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() "Microsoft Forum" wrote in message ... Hi all, Is it possible to view line numbers of a VBA subroutine on screen and in printing? Thanks a lot. Frederick Chow Hong Kong. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to print line/row numbers as well ? | Excel Discussion (Misc queries) | |||
Line and row numbers | New Users to Excel | |||
Line numbers some numbers are blue some are black | Excel Discussion (Misc queries) | |||
line and column numbers | Excel Discussion (Misc queries) | |||
Line numbers | Excel Programming |