LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default run time error 1004 : application defined or object defined error

Experts,

I am trying to modify my range using a variable. I tried couple of
statements but everytime I am getting the same error.

If I am simply using this statement,

Set rng_wise_power_gen_Source =
wbSource.Worksheets("wise").Range("w8:w703")

the code works fine for me. But I want to modify my range based on the
input from user. basically, I just want to increase or decrease the
number or rows from the current range, with starting cell being the
same.

I tried these, but evertime I get the same error:

run time error 1004 : application defined or object defined error

These were the stuffs I tried

1.
row = 24 * (days - 31)
column = 0
Set rng_wise_power_gen_Source =
wbSource.Worksheets("wise").Range("w8:w751").Offse t(0, 0).Resize(row,
column)

2.
row = 24 * (days - 31)
column = 0
Set rng_wise_power_gen_Source =
wbSource.Worksheets("wise").Range(Cells(8, 23), Cells(row, 23))

3.
days_power_gen = 31
Set rng_power_gen_source = rng_wise_power_gen_Source.Resize(24 *
(days_power_gen - 29), 0)

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Run-time error 1004. Application-defined or object-defined error Martin Brennan Excel Programming 2 June 7th 07 01:22 PM
Run Time Error 1004: Application-Defined or Object-Defined Error Diana[_7_] Excel Programming 6 April 17th 07 04:21 PM
Run Time Error 1004 - Application-defined or object-defined error brent Excel Programming 2 October 3rd 05 05:23 PM
Run-time Error 1004: Application-defined or Object-defined Error Adrian Excel Programming 6 August 23rd 05 06:28 AM
Macro Run-time Error 1004 Application Defined or Object Defined Error Anddmx Excel Programming 6 June 9th 04 03:40 PM


All times are GMT +1. The time now is 12:18 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"