Linker IT Software
Google
Web www.oraxcel.com
menubar-top-links menubar-top-rechts
Home Help Search Login
Welcome, Guest. Please Login.
SQL*XL: Database to Excel bridge litLIB: Excel power functions pack ExcelLock: Locking and securing your valuable Excel spreadsheets encOffice: Protect your Excel file easy and safe encOffice: Protect your Excel file easy and safe
Pages: 1
litXLS: changing the font (Read 2642 times)
Gerrit-Jan Linker
YaBB Administrator
*****




Posts: 75
litXLS: changing the font
06.06.07 at 21:52:58
 
litXLS: changing the font
 
Question:
I added a line to change the font size in one cell and if affected all the cells. Is this because I'm trying this in the evaluation copy?
 
Code:
Private Sub Command1_Click()
  Dim xls As litXLS.clsXLS
  Dim wkb As litXLS.clsWorkbook
  Dim wks As litXLS.clsWorksheet
  
  Set xls = New litXLS.clsXLS
  Set wkb = xls.Workbooks.Add
  Set wks = wkb.Worksheets.Add
  
  wks.Cells(5, 1).Value = "A date"
  wks.Cells(5, 2).Value = Now
 
  wks.Cells(5, 2).Font.Size = 16

  Call wkb.SaveAs("C:\xls_text.xls")
  
End Sub
 


 
Answer:
No, this is not due to the evaluation version. The fonts are global objects. There are only 4 of them. If you change the font it will be changed wherever that font is used. To use a different font alter another font and set that to the cell you want to change.
 
You can read more about this in the following topic:
 litXLS: using fonts and font attributes
http://www.oraxcel.com/cgi-bin/yabb2/YaBB.pl?num=1131011674
Back to top
 
 

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
Pages: 1