Hi everybody.
I’m playing with “merging cells” in order to write or draw a text through several columns, in order to create the illusion of merging, thats what I have:
This is on CellTextpaint Event
dim s As String
dim wid As Integer
s = me.Cell(row,column)
if rtrim(s) <> "" Then
g.DrawString s ,x,y
Else
//blank cell - check for overspill
Select Case column
Case 1
wid = 35
s = me.Cell(row,column-1)
g.DrawString s ,x-wid ,y
Case 2
wid = 93
s = me.Cell(row,column-2)
g.DrawString s ,x-wid ,y
End Select
End If
Return True
And that’s on Action Button
ListBox1.ColumnCount = 5
ListBox1.ColumnWidths = "40,60,50,50"
ListBox1.AddRow "Hello customers that the Sales Report"
ListBox1.Cell(0,1) = ""
ListBox1.Cell(0,2) = ""
ListBox1.Cell(0,3) = ""
ListBox1.Cell(0,4) = ""
ListBox1.Cell(0,5) = ""
Now that I want to do it is that everytime that the String starts with “Hello” word, do that “merging effect”
I’ve tried with InStr(me.cell(row,column) >0 and doesn’t work, I dunno whats going wrong