in reply to Re: Can't call method "Range" on an undefined value at line 16
in thread Can't call method "Range" on an undefined value at line 16

that is required as 'm pasting the values in sheet 2. so i have defined the sheet2.
  • Comment on Re^2: Can't call method "Range" on an undefined value at line 16

Replies are listed 'Best First'.
Re^3: Can't call method "Range" on an undefined value at line 16
by Anonymous Monk on Nov 11, 2015 at 10:13 UTC

    that is required as 'm pasting the values in sheet 2. so i have defined the sheet2.

    what? This is the sequence

    Q: I get error...

    A: Its because...

    ?: that is required

    You're getting an error, you may require that it simply works, but you're getting an error ... now you have to figure out why, wrong API call, wrong version of office, something else ... Worksheets(1) is returning undef, you have to figure out why,

    I don't have excel