Hi Experts,
My requirement is explained below
step 1: (Myfile) is active workbook-->Click Button-->open the Required workbook file -->from that file ,save all sheet name in combo-list box
step 2: Now select sheet name from combo box-->selected sheetname will be paste to "myfile" workbook
Mycode is below
-------------------------------------------------------------------![]()
Please Login or Register to view this content.
'(Module1 code)
---------------------------------------------------------![]()
Please Login or Register to view this content.
'copy that particular tab in another file
------------------------------------------------------------![]()
Please Login or Register to view this content.
My problem is..
for First time run --> code ran fine
for Second time run--> am getting error "Subscript out of Range"
only if i click reset button I am able to run
This error because Windows(filename).Activate ,here where variable "filename" was initially empty while calling sub maincodeButton_click()
Always for second run I have to Reset macro .....But i dont know how to over come...please solve my problem
Bookmarks