I use VB6.0 and when I execute the code I have given below, I get runtime Error 1004 - Specified value is out of range.
Can anyone help me to solve this error.
What are the appropriate values for left,top and wide and height?
Code:
Set oXL = CreateObject("Excel.Application") oXL.Visible = True Set oWB = oXL.Workbooks.Add oWB.Windows.Application.Visible = true Set oSheet = oWB.ActiveSheet oSheet.Name = "TEST" oSheet.Visible = xlSheetVisible Dim left As Single Dim top As Single Dim wide As Single Dim height As Single left = 100 top = 100 wide = 100 height = 100 oSheet.Shapes.AddShape msoShapeRectangle, left, top, wide, height
What are the appropriate values for left,top and wide and height?
Comment