Wrox Programmer Forums
|
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 2nd, 2005, 08:27 AM
Authorized User
 
Join Date: Sep 2003
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default Type Mismatch

Hi people,

Could do with some help here if possible. I am getting a Type Mismatch on the following code...

Sub tidy_Up()

    Sheets(" XP Deployment Schedule").Select
    rowno = 2
    While Cells(rowno, 1) <> ""
        If Cells(rowno, 27) = 0 Then Cells(rowno, 27) = ""
        If Cells(rowno, 28) = 0 Then Cells(rowno, 28) = ""
        If Cells(rowno, 29) = 0 Then Cells(rowno, 29) = ""
        If Cells(rowno, 29) > 1 Then Cells(rowno, 29) = ""

        'Cells(rowno, 26).Select
        Range("AA" & rowno & ":AD" & rowno).Interior.ColorIndex = Range("Z" & rowno).Interior.ColorIndex
        rowno = rowno + 1
    Wend

    Range("AA2:AD" & rowno).Select
    Selection.Copy
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False

        Cells.Select
    With Selection
        .WrapText = False

    End With
    Range("A2").Select

End Sub

Can anyone see a problem with this or does it really depend on the rest of the code? There is too much to post, but this is the sub that it appears to be failing on.

I would really appreciate your help...

Thanks

Patrick

Visit my site: http://www.drybonesuk.com
__________________
Visit my site: http://www.drybonesuk.com
 
Old September 18th, 2005, 01:00 PM
Authorized User
 
Join Date: Feb 2005
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Could you tell me where the program crashes exactly. Hereby I mean where does the VB Debugger stop (the yellow line).





Similar Threads
Thread Thread Starter Forum Replies Last Post
Type Mismatch Anup Gavate VB How-To 4 March 28th, 2005 01:48 PM
Type mismatch NoBullMan Classic ASP Basics 2 November 16th, 2004 03:16 AM
Type mismatch per.holleufer Classic ASP Basics 5 July 31st, 2004 07:33 AM
Type mismatch sporkman43 Classic ASP Basics 4 August 14th, 2003 03:27 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.