sunilvedula Posted January 21, 2008 Report Share Posted January 21, 2008 hi, i want the macro to recognize my sheets in the active window excel. What presently my macro does is after copying data from one application it activates a window in excel with the name metris.report. It pastes the data in the first sheet. But i want based on a variable t1 which gets assigned while copying from the application to go to the exact name of the sheet and paste there. i hope i was clear. will be waiting for your replies. If possible someone reply ASAP as my project deadline is very near. Quote Link to comment Share on other sites More sharing options...
joe Posted January 21, 2008 Report Share Posted January 21, 2008 But i want based on a variable t1 which gets assigned while copying from the application to go to the exact name of the sheet and paste there. The key to having Macro Express go to the correct sheet, is to know how to go to the correct sheet manually, then use the Text Type command. You can activate any sheet in a workbook by using the Excel Go To dialog; once a workbook is launched, simply type <CTRL>+G to bring forth the dialog. In the Reference: field type the name of the sheet followed by an exclamation point followed by a cell reference (A1, C3, etc). Say, for example, you wanted to activate a sheet named MyWorksheet: enter "MyWorksheet!A1" into the field and hit enter. If you were to set a text variable in Macro Express, say %T1%, then that is what Macro Express would type. Quote Link to comment Share on other sites More sharing options...
sunilvedula Posted January 21, 2008 Author Report Share Posted January 21, 2008 Thank you very much for the fast reply. But the problem is that i am not very good in excel. let me be a bit clear. we generally have 4 reports to be pulled from an application and we have 4 sheets with names"3617, "5621", "7251", and "8800". Now there can be around 2 to 100 records in each report. it varies. Now what i want is in the application where it copies the records if the report changes (the report numbr is stored in t1) it has to go to the correct sheet and paste there. Can u help me with the code as i cant understand how to put that or type that in macro express in type text. i dont know how to reference it. Quote Link to comment Share on other sites More sharing options...
sunilvedula Posted January 22, 2008 Author Report Share Posted January 22, 2008 My problem is resolved with your reply. sorry for not understanding it initially. Thanks a lot! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.