We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

formula cell question

I have a question about how we are doing formulas. We recently on some forms that had only 32 cols have now expanded those to have 100 cols. Below is a sample of the code of how we were loading the formula cells. The problem I have is that when I try to put col ''as'' in my enum below it wont let me use it. It errors out because ''as'' is a reserved word. Is there a more simple way to do what we are doing or any suggestions on how to make what we have work? Thanks Private Enum alpha As Integer a = 1 b c d e f g h i j k l m n o p q r s t u v w x y z aa ab ac ad ae af ag ah aj ak al am an ao ap aq ar at End Enum For i = 2 To 100 With grdCB_PRP(2, i) .Format = "0.00" .CellType = "FormulaCell" .CellValue = "=Sum" & "(" & [Enum].GetName(bit.GetType, i) & 3 & ":" & [Enum].GetName(bit.GetType, i) & 42 & ")" End With Next

2 Replies

AD Administrator Syncfusion Team July 10, 2006 02:48 PM UTC

Instead of using [Enum].GetName(bit.GetType, i), try using the shared member of GridRangeInfo.GetAlphaLabel. Dim col as String For i = 2 To 100 col = GridRangeInfo.GetAlphaLabel(i) With grdCB_PRP(2, i) .Format = "0.00" .CellType = "FormulaCell" .CellValue = "=Sum" & "(" & col & 3 & ":" & col & 42 & ")" End With Next


PB Philip Bishop July 10, 2006 03:28 PM UTC

Hey thanks for the fast response. Thats exactly what I was looking for. Works great!!

Loader.
Live Chat Icon For mobile
Up arrow icon