Hi All
I am trying to understand what these debug modes are all about, i Know its very essential in a coding which will help us.
But some one can tel me where and how we should use this. I have a long list of queries out of which few are.
Debug.print
debut.assert
Immediate window. (I know this is something which we use to see immediate results for your coding)
My code is below. which is a very small programme. where it just shows left,right of a string in the cells. MY query is where i can use the above two to options(debut print and debug asser) and understand how it helps. what is that in the immediate window should i type / paste to see the immediate results. have read articles from cpearsons, but while it comes to my coding i am confused.
Private Sub nameincells_Click()
Dim NIC1 As String
Dim NIC2 As String
Dim NIC3 As String
Dim NIC4 As String
Dim NIC5 As String
Dim NIC6 As String
'NIC1 = InputBox("ENTER A STRING")
NIC1 = "ARTHUR DAVID SIMON"
MsgBox NIC1
NIC2 = Len(NIC1)
MsgBox "Length of the string is:-" & NIC2
For I = 1 To NIC2
Sheets("Sheet5").Activate
ActiveSheet.Cells(I, 5).Value = Left(NIC1, NIC2 - (NIC2 - I)) ' To fill one letter each from left and build in the next rows
ActiveSheet.Cells(I, 7).Value = Right(NIC1, NIC2 - (NIC2 - I)) ' To fill one letter each from right and build in the next rows
ActiveSheet.Cells(I, 6).Value = Mid(NIC1, 1, NIC2 - (NIC2 - I))
Next I
End Sub
Bookmarks