hussy
04-03-2012, 12:29 AM
Hi all,
In my project, I have three forms, calendar, userform1(which is data entry form) and Userform2(which is filter and copy form)
I want to keep data entry form,filter form separate workbook (let say workbook1) and the all the other things (records) should be in another workbook (let say workbook2). As I learnt last couple of days,
Set rngSource = Worksheets("item").Range("c2:c100") should be changed to
Set rngSource = Workbooks("workbook2").Worksheets("item").Range("c2:c100").
But the problem is, I have to open both file to work with forms. I don't want to open workbook2. As I understand there are no way other than opening workbook2. I think the best way to do it, when the forms open, workbook should open automatically, but workbook should not appears to the user(need to hide from the user). What do you think? Problem is I don't know the code for that. I tried to find. but I couldn't.
Could you please tell me the solution for that.
'to enter data into another workbook
Set rngSource = Worksheets("item").Range("c2:c1048576")
'should be changed to
Set rngSource = Workbooks("bookname").Worksheets("item").Range("c2:c1048576").
In my project, I have three forms, calendar, userform1(which is data entry form) and Userform2(which is filter and copy form)
I want to keep data entry form,filter form separate workbook (let say workbook1) and the all the other things (records) should be in another workbook (let say workbook2). As I learnt last couple of days,
Set rngSource = Worksheets("item").Range("c2:c100") should be changed to
Set rngSource = Workbooks("workbook2").Worksheets("item").Range("c2:c100").
But the problem is, I have to open both file to work with forms. I don't want to open workbook2. As I understand there are no way other than opening workbook2. I think the best way to do it, when the forms open, workbook should open automatically, but workbook should not appears to the user(need to hide from the user). What do you think? Problem is I don't know the code for that. I tried to find. but I couldn't.
Could you please tell me the solution for that.
'to enter data into another workbook
Set rngSource = Worksheets("item").Range("c2:c1048576")
'should be changed to
Set rngSource = Workbooks("bookname").Worksheets("item").Range("c2:c1048576").