I am storing some data from two columns and I need to display a message box with the two columns in neat way
Here's the line that constructs the string
Code: Select all
s1 = s1 & IIf(s1 = Empty, Empty, vbCrLf) & shINF.Cells(x, 2).Value & IIf(Len(shINF.Cells(x, 2).Value) <= 30, Space(50 - Len(shINF.Cells(x, 2).Value)), Empty) & shINF.Cells(x, 4).Value
Code: Select all
s1 = s1 & IIf(s1 = Empty, Empty, vbCrLf) & shINF.Cells(x, 2).Value & Space(50 - Len(shINF.Cells(x, 2).Value)) & shINF.Cells(x, 4).Value
Note: when I tried to print the texts in the immediate window, it worked well and as expected. Is there a default width for the message box?