P
plh
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
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