Ranbeer Singh
Full Member level 5
- Joined
- Jul 30, 2015
- Messages
- 259
- Helped
- 22
- Reputation
- 44
- Reaction score
- 22
- Trophy points
- 1,298
- Location
- Faridabad India
- Activity points
- 3,266
Hi All
How can i use variable with Select case statement.
Normally use
But I want to use a variable value place of 0, 'a', >1. I using a variable a.
My codes
I tried it. I want to write 74 pages. But It write a single page only.
How can i use variable with Select case statement.
Normally use
Code:
case 0 :
case 'a' :
case >1 :
But I want to use a variable value place of 0, 'a', >1. I using a variable a.
My codes
Code Basic4GL - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 For a = 0 To 74 Select Case Page Case Is = a ' Write all pages While (ss < (45 * a)) ' Loop for write all cell of one page row = MbAddrs.Rows(ss) k = 0 Do While (k < 8) ' Write single cell data cell = row.Cells(k) e.Graphics.DrawRectangle(Pens.Black, rect) If (Not (cell.Value) Is Nothing) Then e.Graphics.DrawString(cell.EditedFormattedValue.ToString, SystemFonts.DefaultFont, Brushes.Black, rect, sf) End If x = x + rect.Width k = k + 1 Loop x = 100 y = y + row.Height ss += 1 End While a += 1 e.HasMorePages = True End Select page+=1 Next e.HasMorePages = False
I tried it. I want to write 74 pages. But It write a single page only.