Hi Kevin Add a hidden blank sheet called "Link" to your WB (or it may need to be called "Linknothing" depending on what is actually in col J
Change the line Sheets.Add After:=Sheets(Sheets.Count) ' to sheets("Link" & MyCell.offset(0,7).value).copy After:=Sheets(Sheets.Count) Regards David Grugeon On 27 July 2012 03:57, skyping1 <kevinrobertg...@hotmail.com> wrote: > Need your help once again!!! > > A previous project needs to be updated and I simply cannot my head around > it. > > I have a workbook that currently comprises of 5 worksheets, 3 of which are > relating to my problem and are hidden. These are called Link1, Link2, and > Link3. > > The initial concept of the project was to generate new worksheets labelled > from the contents of c12:c31 on the Intro worksheet. This works fineā¦. see > macro below: > > Private Sub GENERATE_Click() > On Error Resume Next > Call DeleteSheets > Dim MyCell As Range, MyRange As Range > Set MyRange = Sheets("Intro").Range("c12") > Set MyRange = Range(MyRange, MyRange.End(xlDown)) > For Each MyCell In MyRange > Sheets.Add After:=Sheets(Sheets.Count) 'creates a new worksheet > Sheets(Sheets.Count).Name = MyCell.Value ' renames the new worksheet > Next MyCell > End Sub > > However, I have added another variable which is displayed in a drop down > list in j12:j31, which relates to the content of these 3 new hidden sheets. > > What I need to do is when generating the new sheets via the Generate > macro, the corresponding selection in column J, will copy the relevant > sheet (Link1, Link2, Link3 or nothing) to the new sheet with the > corresponding name from column C. > > I really hope this is coherent (!!) and welcome any advice on this problem. > > Many thanks for looking. > > -- > -- > 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 > > To unsubscribe, send a blank email to > excel-macros+unsubscr...@googlegroups.com > > -- > David Grugeon > > <excel-macros%2bunsubscr...@googlegroups.com> -- -- 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 To unsubscribe, send a blank email to excel-macros+unsubscr...@googlegroups.com