L
Leo
Hi -
Simple question but long story below...
I am writing a code that imports specific 'Ranges' for an
excel spreadsheet into a column in Access.
I am using the following command:
!Name = xlssheet.Range("Name")
However, in some cases, the range "Name" may not always be
a range available in the excel spreadsheet.
Thus, I am trying to write an 'If' statement that will
take care of this.
I tried the following:
If xlssheet.Range("Name") = "" Then
!Name = 0
Else
!Name = xlssheet.Range("Name")
End If
I know this will not work because excel is trying to find
something that doesn't EXIST to begin with, thus there is
an error.
I am looking for a command (or something) I can use to
address this problem.
Please Advise.
Thanks!!
Simple question but long story below...
I am writing a code that imports specific 'Ranges' for an
excel spreadsheet into a column in Access.
I am using the following command:
!Name = xlssheet.Range("Name")
However, in some cases, the range "Name" may not always be
a range available in the excel spreadsheet.
Thus, I am trying to write an 'If' statement that will
take care of this.
I tried the following:
If xlssheet.Range("Name") = "" Then
!Name = 0
Else
!Name = xlssheet.Range("Name")
End If
I know this will not work because excel is trying to find
something that doesn't EXIST to begin with, thus there is
an error.
I am looking for a command (or something) I can use to
address this problem.
Please Advise.
Thanks!!