|
accessman -> VBA for Excel Code (7/9/2006 15:14:25)
|
Hi, I write VBA in MS Access .Worksheets(3).cells(p,i) = 1 .Worksheets(3).cells(p+1,i) = 2 .Worksheets(3).cells(p+2,i) = 3 .Worksheets(3).cells(p+3,i).formula = "=Sum(" & .Worksheets(3).Cells(p, i) & ":" & .Worksheets(3).Cells(p+2, i) & ")" But, the sum function doesn't work, because it only get the cells value, it needs cells name (eg. B2, B3, ...etc). I want to use cells(p,i) to represent, because I make the variable column, and rows depend on the input parameters. Please let me know, thanks.
|
|
|
|