Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello All XL Gurus,
I am calling and Excel spreadsheet as an external object from Solidworks (a widely used CAD package) using the function Set obEx = GetObject(strRtgFolder & strRtgFile) where "strRtgFolder & strRtgFile" evaluates to an existing spreadsheet. This is passed to a sub: Call Stitch14Deg(obEx, intRtgNumStep, intNoteStart, intNoteInc) then inside that sub to another sub: Sub Stitch14Deg(obX As Object, intStep As Integer, intNStart As Integer, intNInc As Integer) .... .... .... Call HighlightActiveCell(obX, r, (c), frmStart.cmbType.Value) .... .... End Sub Sub HighlightActiveCell(oX As Object, r, c As Long, strSheet As String) oX.sheets(strSheet).cells(r,c).Select Selection.Borders(xlDiagonalDown).LineStyle = xlNone Selection.Borders(xlDiagonalUp).LineStyle = xlNone .... .... .... End Sub When it gets to HighlightActiveCell I get a "Variable not defined" Error referring to xlNone. There are many other constants referred to. I changed the first xlNone to 1, just to see what would happen: The message moved back to xlDiagonalDown. Is there a way out of this? I was thinking that if there is a reference somewhere of the numeric value of these constants, I could substitute them in. The following is a list of the constants I am trying to use: xlNone xlContinuous xlMedium xlAutomatic xlDiagonalDown xlDiagonalUp xlEdgeLeft xlEdgeTop xlEdgeBottom xlEdgeRight xlInsideVertical xlInsideHorizontal Thank You! -plh -- Where are we going and why am I in this HAND BASKET?? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In xl try runnig this sub to see the numbers...
Sub test3() MsgBox xlNone MsgBox xlContinuous MsgBox xlMedium MsgBox xlAutomatic MsgBox xlDiagonalDown MsgBox xlDiagonalUp MsgBox xlEdgeLeft MsgBox xlEdgeTop MsgBox xlEdgeBottom MsgBox xlEdgeRight MsgBox xlInsideVertical MsgBox xlInsideHorizontal End Sub You can then make these values into constants Public Const xlNone as long = -4142 .... Finally to remove the all of the borders you can use... Selection.Border.LineStyle = xlNone -- HTH... Jim Thomlinson "plh" wrote: Hello All XL Gurus, I am calling and Excel spreadsheet as an external object from Solidworks (a widely used CAD package) using the function Set obEx = GetObject(strRtgFolder & strRtgFile) where "strRtgFolder & strRtgFile" evaluates to an existing spreadsheet. This is passed to a sub: Call Stitch14Deg(obEx, intRtgNumStep, intNoteStart, intNoteInc) then inside that sub to another sub: Sub Stitch14Deg(obX As Object, intStep As Integer, intNStart As Integer, intNInc As Integer) .... .... .... Call HighlightActiveCell(obX, r, (c), frmStart.cmbType.Value) .... .... End Sub Sub HighlightActiveCell(oX As Object, r, c As Long, strSheet As String) oX.sheets(strSheet).cells(r,c).Select Selection.Borders(xlDiagonalDown).LineStyle = xlNone Selection.Borders(xlDiagonalUp).LineStyle = xlNone .... .... .... End Sub When it gets to HighlightActiveCell I get a "Variable not defined" Error referring to xlNone. There are many other constants referred to. I changed the first xlNone to 1, just to see what would happen: The message moved back to xlDiagonalDown. Is there a way out of this? I was thinking that if there is a reference somewhere of the numeric value of these constants, I could substitute them in. The following is a list of the constants I am trying to use: xlNone xlContinuous xlMedium xlAutomatic xlDiagonalDown xlDiagonalUp xlEdgeLeft xlEdgeTop xlEdgeBottom xlEdgeRight xlInsideVertical xlInsideHorizontal Thank You! -plh -- Where are we going and why am I in this HAND BASKET?? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Worked like a charm, thanx!
-plh In article , ?B?SmltIFRob21saW5zb24=?= says... In xl try runnig this sub to see the numbers... Sub test3() MsgBox xlNone MsgBox xlContinuous MsgBox xlMedium MsgBox xlAutomatic MsgBox xlDiagonalDown MsgBox xlDiagonalUp MsgBox xlEdgeLeft MsgBox xlEdgeTop MsgBox xlEdgeBottom MsgBox xlEdgeRight MsgBox xlInsideVertical MsgBox xlInsideHorizontal End Sub You can then make these values into constants Public Const xlNone as long = -4142 ... Finally to remove the all of the borders you can use... Selection.Border.LineStyle = xlNone -- HTH... Jim Thomlinson "plh" wrote: Hello All XL Gurus, I am calling and Excel spreadsheet as an external object from Solidworks (a widely used CAD package) using the function Set obEx = GetObject(strRtgFolder & strRtgFile) where "strRtgFolder & strRtgFile" evaluates to an existing spreadsheet. This is passed to a sub: Call Stitch14Deg(obEx, intRtgNumStep, intNoteStart, intNoteInc) then inside that sub to another sub: Sub Stitch14Deg(obX As Object, intStep As Integer, intNStart As Integer, intNInc As Integer) .... .... .... Call HighlightActiveCell(obX, r, (c), frmStart.cmbType.Value) .... .... End Sub Sub HighlightActiveCell(oX As Object, r, c As Long, strSheet As String) oX.sheets(strSheet).cells(r,c).Select Selection.Borders(xlDiagonalDown).LineStyle = xlNone Selection.Borders(xlDiagonalUp).LineStyle = xlNone .... .... .... End Sub When it gets to HighlightActiveCell I get a "Variable not defined" Error referring to xlNone. There are many other constants referred to. I changed the first xlNone to 1, just to see what would happen: The message moved back to xlDiagonalDown. Is there a way out of this? I was thinking that if there is a reference somewhere of the numeric value of these constants, I could substitute them in. The following is a list of the constants I am trying to use: xlNone xlContinuous xlMedium xlAutomatic xlDiagonalDown xlDiagonalUp xlEdgeLeft xlEdgeTop xlEdgeBottom xlEdgeRight xlInsideVertical xlInsideHorizontal Thank You! -plh -- Where are we going and why am I in this HAND BASKET?? -- Where are we going and why am I in this HAND BASKET?? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Numeric in Text to convert back to the form of Numeric for VLookup Purposes | Excel Discussion (Misc queries) | |||
Match Single Numeric Criteria and Return Multiple Numeric Labels | Excel Worksheet Functions | |||
Match Single Numeric Criteria and Return Multiple Numeric Labels | Excel Worksheet Functions | |||
colorindex = xlnone on condition of month of year | Excel Programming | |||
xlNone incorrectly valued? | Excel Programming |