Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Jan 2003
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Excel Macros - What am I doing wrong? (Excell 2002)

    I created a macro in Excel that I'd like to apply to individual spreadsheets in a workbook. When I applied it to one, it showed up on all the others. What am I doing wrong?

  2. #2
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Excel Macros - What am I doing wrong? (Excell 2002)

    Hi. Your question is a little general, and so it's hard to tell. The most likely reason is that you need to specify the particular worksheet in the code, such as:

    ActiveWorkbook.Worksheets("Name").Range("RangeName ").Method

    Can you post the code into your message?
    -John ... I float in liquid gardens
    UTC -7ąDS

  3. #3
    New Lounger
    Join Date
    Jan 2003
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Excel Macros - What am I doing wrong? (Excell 2002)

    How do I get the code?

  4. #4
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Excel Macros - What am I doing wrong? (Excell 2002)

    From the Visual Basic Editor. First, read <!profile=LegareColeman>LegareColeman<!/profile>'s <!post=StarPost,118382>StarPost<!/post>, especially the second part about Alt-F11. Note that in your case the macro should NOT be in personal.xls, it should be in your specific workbook.

    If your project code doesn't show, select the specific workbook from the Project Explorer on the left side of the Visual Basic Editor screen (see attachment),and click the module attached to it. The code will then show in the Code Window on the right hand side (again, see attachment). Copy and paste it into Word, then into a Lounge post.

    If this is too complex, censor the workbook and attach it to a reply post.

    (I know, there's a lot to learn about VBA and about the Lounge. Perhaps you should start by reading a VBA book, see this recent discussion <!post=thread,180035>thread<!/post>.)
    Attached Images Attached Images
    -John ... I float in liquid gardens
    UTC -7ąDS

Posting Permissions

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