![]() |
Wrong text in msgbox
I run a routine to (among other things) delete certain cells. Tom Ogilvy
gave me code which is supposed to collect the values of the deleted cells in the string "strTIR" (Dim'd at the beginning of the code) and display them in a message box. The message box popped up this morning showing me "strTIR", instead of the collected cell values! This make me think that, just possibly, I may(?!?) have screwed up Tom's code. I have included the pertinant parts of the code below. Any kicks in the proper direction are appreciated. Ed ' Runs routine to delete all file paths with ERROR msg Range("AM1").Select Selection.End(xlDown).Select Do While ActiveCell.Value < "Header" If ActiveCell.Value = "" Then ActiveCell.Offset(rowOffset:=-1, columnOffset:=0).Activate Else: rngR = ActiveCell.Row Range("AB" & rngR).Select ' add TIR No to string strTIR = strTIR & ActiveCell.Value & vbNewLine Selection.Delete Shift:=xlUp Range("AM" & rngR).Select ActiveCell.Offset(rowOffset:=-1, columnOffset:=0).Activate End If Loop ' Display TIRs deleted MsgBox "Deleted TIRs:" & Chr(13) & "strTIR" |
All times are GMT +1. The time now is 08:49 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com