+ Reply to Thread
Results 1 to 4 of 4

return to previous worksheet

  1. #1
    Registered User
    Join Date
    01-28-2013
    Location
    London, England
    MS-Off Ver
    Office 365 for Mac
    Posts
    17

    return to previous worksheet

    I have a workbook in which I create invoices so I am frequently adding new worksheets (invoices). I have all my clients addresses in each worksheet and I use a macro to place the chosen address in a specific cell location on that worksheet. This means every worksheet I create carries the whole list of my clients

    I have put the address list into a separate sheet, Sheet1 and hidden it. What I would like to do is call the address from Sheet1. Using the macro I can go to sheet1 unhide it, select and copy the information, but I cannot return to the previous sheet I was using to paste the information. All the methods I have tried end up with an error.

    Can anyone help.

    PW

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: return to previous worksheet

    Can we see you current code?

    You don't need to unhide or select a worksheet to get information from it.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    01-28-2013
    Location
    London, England
    MS-Off Ver
    Office 365 for Mac
    Posts
    17

    Re: return to previous worksheet

    Hi Norie
    Thanks for the quick response I have renamed Sheet1, Ad.

    Sub Claudia_Lesti()
    '
    ' Claudia_Lesti Macro
    '
    Sheets("Ad").Visible = True 'Opens Addresses
    'Sheets("Ad").Select
    '
    Range("M15:M20").Select
    Selection.Copy 'Need to switch back to last used worksheet at this point
    'ActiveSheet.Next.Select ' This switches back to previous sheet
    'ActiveSheet.Previous.Select 'This switches back to new sheet
    'LastSheet.Select
    Range("A12").Select
    ActiveSheet.Paste

    Range("M22").Select 'will need to switch back to Ad worksheet at this point
    Application.CutCopyMode = False
    Selection.Copy 'Then return to last used worksheet at this point
    Range("H21").Select
    ActiveSheet.Paste
    Range("B19").Select
    Application.CutCopyMode = False
    Range("A18").Select
    ActiveWindow.ScrollRow = 11
    Range("B19").Select
    End Sub

  4. #4
    Registered User
    Join Date
    01-28-2013
    Location
    London, England
    MS-Off Ver
    Office 365 for Mac
    Posts
    17

    Re: return to previous worksheet

    Hi Norie

    Thanks for your interest but after thinking about it a little more I found the solution. You gave me a clue when you said that I didn't have to unhide the sheet.

    Thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Keyboard shortcut to return to previous place in worksheet.
    By joaquinwalking in forum Excel General
    Replies: 2
    Last Post: 07-18-2013, 07:35 PM
  2. Return to previous userform from an active worksheet.
    By Tom V in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-10-2012, 06:57 PM
  3. Return to previous Page
    By Danielle123 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-09-2008, 01:31 PM
  4. [SOLVED] Return to previous worksheet
    By Mats Samson in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-20-2005, 04:05 PM
  5. [SOLVED] How do I return to a previous worksheet in Excel?
    By chiell in forum Excel General
    Replies: 2
    Last Post: 05-04-2005, 10:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1