Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course

Topic Closed

0

Topic Closed

Answer
Discuss

Discussion

"Topic closed" comes across as a bit rude Avinash. You asked a question. Ken helped you out. You didn't accept the answer, made an unrelated complaint (your runtime error 1004 is not caused by the line that Ken correctly suggested in answer to your question). Instead of saying thank you you delete your question and create a topic "Topic closed". That's not the way to make friends.
Variatus (rep: 4889) Aug 28, '19 at 8:46 pm
Mam that was not my intention  u know i am not that type of guy 
I wanted to delete the question but i was unable to delete it so i mentioned topic closed bcoz no one waste there precious time in this post 
bcoz i found an alternative way to the same  i am changing my file to make it simple 
Sorry for the same this will not be repeated in future
avinash (rep: 10) Aug 30, '19 at 1:56 am
Add to Discussion

Answers

0
Selected Answer
'With Wbk1.Sheets("sheet1")
With Wbk1.WorkSheets(1)
Discuss

Discussion

Run time error 1004 application defined or object defined error Ary = .Range("B2", .Range("B" & Rows.Count).End(xlUp).Offset(, 8)).Value2 this line is highlighted  
avinash (rep: 10) Aug 26, '19 at 9:35 pm
Does Compile in the Debug menu show an error? 

More code is needed or a workbook that has the problem. Try to isolate it to just a few lines of code.
KenHobson (rep: 55) Aug 26, '19 at 10:01 pm
I have added sample files plz have a look
price.xlsx is 1.xls
and leverage.xlsx is leverage.xlsx
vba code will be placed in a seperate file macro.xlsm
code has to open that file and 
it should do the process and save and close all the file
If column A of price.xlsx matches with column A of leverage.xlsx then copy column G of price.xlsx and paste it to column F of leverage.xlsx
all files are located in same place
the code which i sent is perfect or not perfect so plz if new code is required then plz provide the same 
avinash (rep: 10) Aug 27, '19 at 12:10 am
I have edited the post plz have a look sir that is the problem leave previous question bcoz the code i writted contains error
avinash (rep: 10) Aug 27, '19 at 12:20 am
Sorry Sir I wanted to delete the post but i was unable to do so thats y i deleted the qestion Sorry for the same
avinash (rep: 10) Aug 30, '19 at 1:53 am
Add to Discussion


Answer the Question

You must create an account to use the forum. Create an Account or Login