G
Guest
I have the following VBScript function to set the NumberFormat on a Range.
It appears instead to be setting the NumberFormat for all cells in the Sheet.
Can anyone explain what I'm doing wrong? (Using Excell 2002)
Private Sub setCellRangeNumberFormat (intBeginRow, intBeginColumn,
intEndRow, intEndColumn, strNumberFormat)
m_objExcelApp.Range ( _
m_objExcelApp.Cells(intBeginRow, intBeginColumn), _
m_objExcelApp.Cells(intEndRow, intEndColumn) _
).Style.NumberFormat = strNumberFormat
End Sub
Thanks!
It appears instead to be setting the NumberFormat for all cells in the Sheet.
Can anyone explain what I'm doing wrong? (Using Excell 2002)
Private Sub setCellRangeNumberFormat (intBeginRow, intBeginColumn,
intEndRow, intEndColumn, strNumberFormat)
m_objExcelApp.Range ( _
m_objExcelApp.Cells(intBeginRow, intBeginColumn), _
m_objExcelApp.Cells(intEndRow, intEndColumn) _
).Style.NumberFormat = strNumberFormat
End Sub
Thanks!