+ Reply to Thread
Results 1 to 3 of 3

Set sem__ = Sheets("template").Copy(before:=Sheets(1))

Hybrid View

  1. #1

    Set sem__ = Sheets("template").Copy(before:=Sheets(1))

    can someone help me on this one .. i cant figured it why i get error
    424



    Set sem__ = Sheets("template").Copy(before:=Sheets(1))


    ty


  2. #2
    Jim Cone
    Guest

    Re: Set sem__ = Sheets("template").Copy(before:=Sheets(1))

    This works...
    Dim sem__ As Excel.Worksheet
    Sheets("template").Copy before:=Sheets(1)
    Set sem__ = ActiveSheet

    Jim Cone
    San Francisco, USA
    http://www.realezsites.com/bus/primitivesoftware


    <[email protected]>
    wrote in message
    can someone help me on this one .. i cant figured it why i get error 424

    Set sem__ = Sheets("template").Copy(before:=Sheets(1))

    ty


  3. #3
    NickHK
    Guest

    Re: Set sem__ = Sheets("template").Copy(before:=Sheets(1))

    If you look at the Copy method of the Sheets collection in the Object
    browser, you'll see that it is defined as "Sub Copy([Before], [After])".
    As a Sub it has no return value and consequently you have nothing to Set
    "sem__" equal to.
    If it was a function (e.g. WorkSheets.Add; "Function Add([Before], [After],
    [Count], [Type]) As Object") then you could as it return a value, an Object
    in this case.

    NickHK

    <[email protected]> wrote in message
    news:[email protected]...
    > can someone help me on this one .. i cant figured it why i get error
    > 424
    >
    >
    >
    > Set sem__ = Sheets("template").Copy(before:=Sheets(1))
    >
    >
    > ty
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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