|
-
Dec 13th, 1999, 07:30 AM
#1
Thread Starter
Lively Member
Hi,
How do I change the back color of an Excell cell and the color of the text in an Excell cell?
R@emdonck
MyCode:
Public Sub stored_procedure_b2()
Const xlExcel5 = 39
Dim XLS As Object ' for the application
Dim XLSheet As Object ' for the worksheet
Set XLS = CreateObject("Excel.Application")
' To Open an existing workbook
XLS.Workbooks.Open ("C:\Shiftverslag\B2 Usage Report1.xls")
' Open the Worksheet named "Input"
Set XLSheet = XLS.Worksheets("Input")
' Set Column Names
XLSheet.Cells(6, 2) = (str_date + (6 / 24)) 'date
'Open the Worksheet named "plan"
Set XLSheet = XLS.Worksheets("plan")
'set new colors
???????????????????????????
'print
XLSheet.PrintOut
' Don't save
XLSheet.Parent.Saved = True
' DO NOT forget to quit the excel app and also to release the objects...
XLSheet.Application.Quit
' Release the Excel object variables
Set XLSheet = Nothing
Set XLS = Nothing
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|