Link to home
Start Free TrialLog in
Avatar of Euro5
Euro5Flag for United States of America

asked on

VBA code need to account for empty rows

The code looks at three sheets and runs code.
But there is a possibility that there is nothing on one of the three rows.
This resulted in an error - can I add a handler?

Sub GetSCS(strSheet As String, varCol As Variant)

Error on                 intLowWt = varDataS(lngRowS, 2)

in this circumstance, I had no data in sheet Intl
What-if-scenario-v4.3.xlsm
Avatar of Norie
Norie

What's the error?

How can we recreate it? ie which sub should be run or button press
Avatar of Euro5

ASKER

the sub is Sub GetSCSDriver() which calls the
Sub GetSCS(strSheet As String, varCol As Variant)

You could use the button, but probably more expedient just to run the
Sub GetSCSDriver

THANKS!!
ASKER CERTIFIED SOLUTION
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial