LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default runtime error 13 - unlucky for some!


afternoon!

this has been bugging me for ages!

am not excellent in vba so please be nice!!

i have a spreadsheet of about 1500 lines and would like to (using
macro) strip out all the records i don't need based a value in one o
the columns.

for example:

column b holds the name of the programme and i only want projects wit
a programme name of either zmxxxx or zmyyyy. the macro i am tryin
(and failing)to write would look at the value of b1, evaluate it an
delete it if it didn't match either zmxxxx or zmyyyy.

the code:

Sub tidy_up()

Const workstream1 As String = "zmxxx"
Const workstream2 As String = "myyyy

Dim project As String

project = activecell

If CStr(project) < CStr(workstream1) Or CStr(workstream2) Then

activecell.EntireRow.Delete

Else

End If

End Sub

i keep getting run time error 13 appear. i can't see where the proble
is as everything matches (as far as my very untrained eye can see!)

please can anyone out there in cyberland help as i have a big dent i
my head from banging it against my desk!

TIA,

MoonWeaze

--
MoonWeaze
-----------------------------------------------------------------------
MoonWeazel's Profile: http://www.excelforum.com/member.php...nfo&userid=211
View this thread: http://www.excelforum.com/showthread.php?threadid=47878

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
xpath error? Runtime Error 13 type mismatch Steve M[_2_] Excel Discussion (Misc queries) 0 January 17th 08 01:16 AM
Excel 2003 Macro Error - Runtime error 1004 Cow Excel Discussion (Misc queries) 2 June 7th 05 01:40 PM
naming tab macro error runtime error 1004 D Excel Programming 3 February 28th 05 01:32 AM
Syntax Error Runtime Error '424' Object Required sjenks183 Excel Programming 1 January 23rd 04 09:25 AM
Unknown where is the problem on the Runtime error - Automation error wellie Excel Programming 1 July 10th 03 08:12 AM


All times are GMT +1. The time now is 10:39 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"