Jump to content
Macro Express Forums

how to make macro recognize multiple sheets in a single workbook in excel


sunilvedula

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...