thank you, all works fine now
i haved updated my last message with excel.com.ahk added code.
[EDIT]
oh ! , i don't understand param "-0" would mean
and about "+", i know the COM.AHK post:
Quote:
There are some occasions where another COM Object ObjPrm should be a parameter. In that case, prefix it with "+" like:
Code:
COM_Invoke(Object, "Function", "+" . ObjPrm) ; never directly prefix it like +ObjPrm.
but i don't see the difference with "+" or without "+", can you have a simple method un vbs/vba and the adapter method un ahk (with "+") please?
[/EDIT]
[EDIT]
i have found how change font style:
Style have been test with bold and italic (if you use bold then italic, the text will be bold-italic)
Excel_StyleFont("A", 1, "Bold",1) set Bold = true
Excel_StyleFont("A", 1, "Bold",0) set Bold = false
Excel_StyleFont("A", 1, "Bold",?) i don't know if the fourth param can have other value
Code:
; put param=1 set Style = true, param=2 set Style = false
Excel_StyleFont(ColumnLetter, RowNumber, Style,param){
if !oExcel := COM_GetActiveObject("Excel.Application") { ; Get the Already Running Instance
MsgBox Could not find Excel Instance.
Return
}
;Get the cell range
if !oCells := COM_Invoke(oExcel,"Cells",RowNumber,Excel_GetColumnIndex(ColumnLetter)) {
MsgBox Could not get cell range.
Return
}
oFont := COM_Invoke(oCells,"Font")
COM_Invoke(oFont,Style,param)
COM_Release(oFont)
COM_Release(oCells)
COM_Release(oExcel)
}
i don't know how change color, color function show error msg
and its the same if i try to change background color of a cell ("Interior")
[/EDIT]