+ Reply to Thread
Results 1 to 3 of 3

run-time 13 Type mismatch

  1. #1
    Registered User
    Join Date
    05-08-2006
    Posts
    76

    run-time 13 Type mismatch

    Hi,
    Does anyone know why i get this when I run my macro (excel 2000)
    Any fixes??
    Cheers

    Simon

  2. #2
    Peo Sjoblom
    Guest

    Re: run-time 13 Type mismatch

    Debug it (open the code in the editor and press F8), and post which part
    returns the error

    --

    Regards,

    Peo Sjoblom

    Excel 95 - Excel 2007
    Northwest Excel Solutions
    www.nwexcelsolutions.com
    "It is a good thing to follow the first law of holes;
    if you are in one stop digging." Lord Healey


    "simonsmith" <[email protected]> wrote
    in message news:[email protected]...
    >
    > Hi,
    > Does anyone know why i get this when I run my macro (excel 2000)
    > Any fixes??
    > Cheers
    >
    > Simon
    >
    >
    > --
    > simonsmith
    > ------------------------------------------------------------------------
    > simonsmith's Profile:
    > http://www.excelforum.com/member.php...o&userid=34235
    > View this thread: http://www.excelforum.com/showthread...hreadid=543183
    >




  3. #3
    Registered User
    Join Date
    05-08-2006
    Posts
    76
    It doesnt seem to like the P5 reference to a sheet name. I did not do this so dont really know what is going on,
    Any help very much appreciated

    Thanks
    Simon


    ' Dim sh as Worksheet, sh2 as Worksheet
    Dim strSheetName As String
    strSheetName = Cells(5, 16).Value

    Dim i As Long, j As Long
    Dim rng As Range, cell As Range
    Set sh = Worksheets("sheet1")
    Set sh1 = Worksheets("Compiler")
    j = 1
    Do While sh.Name <> sh1.Name
    Set rng = sh.Range(sh.Range(sh.Range("p3")), _
    sh.Range(sh.Range("p4")))
    i = 0
    For Each cell In rng
    i = i + 1
    sh1.Cells(i, j).Value = cell.Value
    Next
    j = j + 1
    Set sh = Worksheets(sh.Range("p5"))
    '(sh.Range("P5"))
    Loop
    sh1.Activate
    Range("p5").Select
    End Sub

+ 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