Try Sub import() Dim wkb As Workbook Dim z As Long Dim flpath As String Set wkb = Workbooks.Open(Application.GetOpenFilename("Excel File (*.xls*)," & "*xls*")) z = ThisWorkbook.Sheets(1).Range("a65356").End(xlUp).Row + 1 ThisWorkbook.Sheets(1).Range("a" & z).Value = wkb.Sheets(1).textbox1.Value ThisWorkbook.Sheets(1).Range("b" & z).Value = wkb.Sheets(1).textbox2.Value ThisWorkbook.Sheets(1).Range("c" & z).Value = wkb.Sheets(1).textbox3.Value
' add other textboxes as well wkb.Close savechanges:=False End Sub On 5/19/12, Soni.Rajender <soni.rajen...@gmail.com> wrote: > Dear Team > Needs your support. Please find attached two workbooks, description are as > follows: > > 1. *AMR FORM* - that I used to received from different locations. > 2. *Database *- that is the database to store data from *AMR FORM* workbook. > > I want the macro code in the *database* sheet linked to a command button, > on pressing that, the data in the open *AMR form* will gets copied in the * > Database* sheet, here in the database sheet, I have to append the data. > > So that whenever I received any *AMR form*, I open my *database sheet* and > simply press the command button. > > Please help. > > Regards > Rajender Soni > > > > > > -- > FORUM RULES (986+ members already BANNED for violation) > > 1) Use concise, accurate thread titles. Poor thread titles, like Please > Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will > not get quick attention or may not be answered. > > 2) Don't post a question in the thread of another member. > > 3) Don't post questions regarding breaking or bypassing any security > measure. > > 4) Acknowledge the responses you receive, good or bad. > > 5) Cross-promotion of, or links to, forums competitive to this forum in > signatures are prohibited. > > NOTE : Don't ever post personal or confidential data in a workbook. Forum > owners and members are not responsible for any loss. > > ------------------------------------------------------------------------------------------------------ > To post to this group, send email to excel-macros@googlegroups.com > -- *Regards* * * *Ashish Koul* *http://www.excelvbamacros.com/* *http://www.accessvbamacros.com/* <http://www.accessvbamacros.com/> P Before printing, think about the environment. -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. ------------------------------------------------------------------------------------------------------ To post to this group, send email to excel-macros@googlegroups.com