Hi JokerOne,
> I can use:
> [WorksheetName]SheetNumber!Cell(row,col) = 3.14
> but here "col" is the col index while I want to use the col's short name.
There might be a better way, but at least the following should work:[Book1]1!Cell(1,ColNum(B)) = 3.14;
Hope this helps.
--Hideo Fujii
Originlab
P.S. Reversely, to get the short/long name from a column number, you can run like:ii=2;
wks.col$(ii).name$=;
wks.col$(ii).lname$=;
P.P.S.
> range aa = ....
> aa = 3.14
> will work, but appears a bit cumbersome to use in the code.
My favorite style is to use the range notation like following to make the code more consistent throughout, and the range variable name is handy as an alias to be referred at many places: ii=2;
range aa=[Book1]1!wcol(ii);
aa[1]=3.14;