getting cell value with all format without paste

  • Thread starter Thread starter hke
  • Start date Start date
H

hke

Hi folks!

I`m using excel2latex (check it out :) :
http://www.jam-software.com/freeware/index.shtml ) ,

but did find need to assign the latex command \small (which control
fontsize) straight into excel, before passing a range to the late
Sub.

I`m trying

ActiveCell.FormulaR1C1 = "\small" & Chr(123) & Range("A1").Value
Chr(125)

,which works fine (the chr123 and 125 are { and } respectivel
(latex).)

Problem is I want the same numberformat in A1 and ActiveCell, but
Range("A1").Value gives for example 11 in ActiveCell even if A1 say
11,0.
I can`t make it work with ActiveSheet.Paste in place of th
Range("A1").Value.

Anyone ever experienced someting similar, and possibly solved it?how
 
I'm guessing that in 11,0 the comma is the decimal point.

Maybe this:

ActiveCell.FormulaR1C1 = "\small" & Chr(123) & Range("A1").Text & Chr(125)

why not use those characters?

ActiveCell.Value = "\small{" & Range("A1").Text & "}"

(I like to use .formula only if I'm changing the formula. Excel doesn't seem to
care, but it looks nicer to me.)
 
Back
Top