Комментарии:
HI, the code is good and i copied a couple of columns from another sheet, but the date column turns to text after it is pulled in new sheet. can you suggest.
ОтветитьThank You So Mutch, Sir.
Ответитьhow i can filter data before copy
ОтветитьThank you.
Anyway, I still have a question. How to paste the value with format?
Get syntax error on line 1 every time
ОтветитьHi Sir,
I am working on a project which requires data copying from a closed workbook which has few sheets; however, I needs to copy data from following sheets - Vodafone, Airtel, Idea.
There are 12 columns in each sheet; however, I need to copy data from 2nd row of each sheet to the end.
Since the file will be stored in a server, it will be good if I use browse function to open/set workbook from which I need to copy the data.
Below is the code:-
Sub Browse_Current_Roster()
Dim myfile As String
Dim xlApp As Application
Dim xlBook As Workbook
Dim Sh As Object
Dim LastRow_3 As Long
LastRow= ThisWorkbook.Sheets("Current_Roster").Cells(Rows.Count, 1).End(xlUp).Row
myfile = Application.GetOpenFilename(, , "Browse for current roster file")
ThisWorkbook.Sheets("Current_Roster").Range("A6") = myfile
Set xlApp = CreateObject("Excel.Application")
Set xlBook = Workbooks.Open("myfile")
xlBook.Sheets("Vodafone").Range("A2" & LastRow_3).Copy
Set xlBook = ActiveWorkbook
Set Sh = xlBook.Sheets("Current_Roster")
Range("B6").Select
Sh.Paste
End Sub
Pls help
Hello Takyar, I got the error “Excel is waiting for another application to complete an OLE action.”
What would you recommend I try doing?
Dear Takyar, it is wonderful video. I have two questions ..1. How do I copy dynamic columns or entire columns with specific names? 2.I want a dynamic path for source workbook, not the constant path.Appreciate your help in this regard.
ОтветитьDear Mr Takyar,
First of all, thank you very much for your videos! There are very useful !
I am currently trying to used this particular code to reach my target (updating a specific workbook based on input data contained in some other workbooks). By default, the code of an active x button is registered in the sheet level. When I am trying to run the code while kept in this section, I am getting an error message (Error 1004 "Application-defined or Object-defined error"). After some Googling, I found out that putting the code into the Modules section makes it working; which is the case for me as well. Now the problem I have is that the code is no more linked to the button but I have to run the code from VBA console. Is there any way to link the button to a code placed in the module section?
In advance, many thanks for your help!
With my best regards,
How can I copy from another closed workbook using file dialog, to choose the close workbook?
ОтветитьDear Sir, how to copy multiple column of data from two close workbooks with a button in vba? thanks
ОтветитьI've checked an about twenty codes , and this one from you is right!
Thank Genious Man!!! :)
Thanks lot, really helping huge.......
ОтветитьDear Sir how to use this vba code for multiple workbooks.
Ответить