das Ganze entwickelt sich genau in die Richtung, in die ich gehen möchte. Leider habe ich bei einer kleinen Sache noch ein Problem, vielleicht könnt ihr mir da helfen:
Code: Alles auswählen
IncludePath "C:\Users\f13820\Desktop\4.3\"
XIncludeFile "COMate.pbi"
ExcelObject.COMateObject
If OpenWindow(0,#PB_Ignore,#PB_Ignore,800,600,"COMate: OWC11.Spreadsheet-Demo",#PB_Window_SystemMenu|#PB_Window_Invisible)
ExcelObject=COMate_CreateActiveXControl(0,0,800,600,"OWC11.Spreadsheet")
ExcelObject\SetProperty("Cells(1,1) = 'Özgür'")
ExcelObject\SetProperty("Cells(1,2) = 'Levent'")
ExcelObject\SetProperty("Cells(2,1) = 10")
ExcelObject\SetProperty("Cells(2,2) = 20")
ExcelObject\SetProperty("Cells(1, 1)\Interior\Color = 18915966")
ExcelObject\SetProperty("Cells(1, 2)\Interior\Color = 18915966")
ExcelObject\SetProperty("Cells(2, 1)\Interior\Color = 18915966")
ExcelObject\SetProperty("Cells(2, 2)\Interior\Color = 18915966")
ExcelObject\SetProperty("Cells(1, 1)\Font\Color = 255255255")
ExcelObject\SetProperty("Cells(1, 2)\Font\Color = 255255255")
ExcelObject\SetProperty("Cells(2, 1)\Font\Color = 255255255")
ExcelObject\SetProperty("Cells(2, 2)\Font\Color = 255255255")
ExcelObject\GetObjectProperty("Sheets('3')\Delete")
ExcelObject\GetObjectProperty("Sheets('2')\Delete")
ExcelObject\SetProperty("Cells(1, 1)\HorizontalAlignment = -4152") ;-4152 = xlRight
ExcelObject\SetProperty("Cells(1, 2)\HorizontalAlignment = -4152") ;-4152 = xlRight
ExcelObject\SetProperty("Cells(2, 1)\HorizontalAlignment = -4152") ;-4152 = xlRight
ExcelObject\SetProperty("Cells(2, 2)\HorizontalAlignment = -4152") ;-4152 = xlRight
ExcelObject\SetProperty("Cells(1, 1)\Borders(7)\LineStyle = 1") ;7 = xlEdgeLeft ; 1 = xlContinuous
ExcelObject\SetProperty("Cells(1, 1)\Borders(8)\LineStyle = 1") ;8 = xlEdgeTop ; 1 = xlContinuous
ExcelObject\SetProperty("Cells(1, 1)\Borders(9)\LineStyle = 1") ;9 = xlEdgeBottom ; 1 = xlContinuous
ExcelObject\SetProperty("Cells(1, 1)\Borders(10)\LineStyle = 1") ;10 = xlEdgeRight ; 1 = xlContinuous
ExcelObject\SetProperty("Cells(1, 2)\Borders(7)\LineStyle = 1") ;7 = xlEdgeLeft ; 1 = xlContinuous
ExcelObject\SetProperty("Cells(1, 2)\Borders(8)\LineStyle = 1") ;8 = xlEdgeTop ; 1 = xlContinuous
ExcelObject\SetProperty("Cells(1, 2)\Borders(9)\LineStyle = 1") ;9 = xlEdgeBottom ; 1 = xlContinuous
ExcelObject\SetProperty("Cells(1, 2)\Borders(10)\LineStyle = 1") ;10 = xlEdgeRight ; 1 = xlContinuous
ExcelObject\SetProperty("Cells(2, 1)\Borders(7)\LineStyle = 1") ;7 = xlEdgeLeft ; 1 = xlContinuous
ExcelObject\SetProperty("Cells(2, 1)\Borders(8)\LineStyle = 1") ;8 = xlEdgeTop ; 1 = xlContinuous
ExcelObject\SetProperty("Cells(2, 1)\Borders(9)\LineStyle = 1") ;9 = xlEdgeBottom ; 1 = xlContinuous
ExcelObject\SetProperty("Cells(2, 1)\Borders(10)\LineStyle = 1") ;10 = xlEdgeRight ; 1 = xlContinuous
ExcelObject\SetProperty("Cells(2, 2)\Borders(7)\LineStyle = 1") ;7 = xlEdgeLeft ; 1 = xlContinuous
ExcelObject\SetProperty("Cells(2, 2)\Borders(8)\LineStyle = 1") ;8 = xlEdgeTop ; 1 = xlContinuous
ExcelObject\SetProperty("Cells(2, 2)\Borders(9)\LineStyle = 1") ;9 = xlEdgeBottom ; 1 = xlContinuous
ExcelObject\SetProperty("Cells(2, 2)\Borders(10)\LineStyle = 1") ;10 = xlEdgeRight ; 1 = xlContinuous
ExcelObject\SetProperty("Cells(1, 1)\Borders(7)\Weight = 2") ;2 = xlThin
ExcelObject\SetProperty("Cells(1, 1)\Borders(8)\Weight = 2") ;2 = xlThin
ExcelObject\SetProperty("Cells(1, 1)\Borders(9)\Weight = 2") ;2 = xlThin
ExcelObject\SetProperty("Cells(1, 1)\Borders(10)\Weight = 2") ;2 = xlThin
ExcelObject\SetProperty("Cells(1, 2)\Borders(7)\Weight = 2") ;2 = xlThin
ExcelObject\SetProperty("Cells(1, 2)\Borders(8)\Weight = 2") ;2 = xlThin
ExcelObject\SetProperty("Cells(1, 2)\Borders(9)\Weight = 2") ;2 = xlThin
ExcelObject\SetProperty("Cells(1, 2)\Borders(10)\Weight = 2") ;2 = xlThin
ExcelObject\SetProperty("Cells(2, 1)\Borders(7)\Weight = 2") ;2 = xlThin
ExcelObject\SetProperty("Cells(2, 1)\Borders(8)\Weight = 2") ;2 = xlThin
ExcelObject\SetProperty("Cells(2, 1)\Borders(9)\Weight = 2") ;2 = xlThin
ExcelObject\SetProperty("Cells(2, 1)\Borders(10)\Weight = 2") ;2 = xlThin
ExcelObject\SetProperty("Cells(2, 2)\Borders(7)\Weight = 2") ;2 = xlThin
ExcelObject\SetProperty("Cells(2, 2)\Borders(8)\Weight = 2") ;2 = xlThin
ExcelObject\SetProperty("Cells(2, 2)\Borders(9)\Weight = 2") ;2 = xlThin
ExcelObject\SetProperty("Cells(2, 2)\Borders(10)\Weight = 2") ;2 = xlThin
ExcelObject\SetProperty("DisplayToolbar = #False")
ExcelObject\SetProperty("ScreenUpdating = #True")
ExcelObject\SetProperty("ViewOnlyMode = #True") ;Schreibschutz
ExcelObject\SetProperty("DisplayOfficeLogo = #False")
ExcelObject\SetProperty("DisplayTitleBar = #False")
ExcelObject\SetProperty("ViewableRange = '$A$1:$E$5")
ExcelObject\SetProperty("SheetSelector = #False")
HideWindow(0,0)
If ExcelObject
Repeat
Until WaitWindowEvent()=#PB_Event_CloseWindow
ExcelObject\Release()
EndIf
CloseWindow(0)
EndIf
Code: Alles auswählen
ExcelObject\SetProperty("ViewableRange = '$A$1:$E$5'")
ExcelObject\SetProperty("SheetSelector = #False")
Code: Alles auswählen
Spreadsheet1.ActiveWindow.ViewableRange = "$A$1:$E$5"
Code: Alles auswählen
Me.Spreadsheet1.ActiveWindow.ViewableRange = "$A$1:$E$5"
Grüße