Advertisement

There's no such thing as a stupid question, but they're the easiest to answer.
Login
Search

Advertisement

Business Applications Business Applications
Search Search
Search for:
Tech Support Guy > > >

Excel VB script to delete row after a certain time


(!)

kdorsainvil's Avatar
kdorsainvil kdorsainvil is offline
Junior Member with 1 posts.
THREAD STARTER
 
Join Date: Feb 2011
Experience: Intermediate
18-Feb-2011, 11:04 AM #1
Excel VB script to delete row after a certain time
I am currently using excel to display some information. I was hoping someone can help me out with a VB script. I am trying to create a script that will check the current time. If the current time is greater than a time in a cell, then it should delete the row.
Thanks in advance for the help
falconMM's Avatar
falconMM falconMM is offline
Computer Specs
Junior Member with 29 posts.
 
Join Date: Feb 2010
Experience: Advanced
18-Feb-2011, 12:59 PM #2
You should go to Mr. Excel. You'll get an answer within a couple of minutes there. You never know how long this answer could take
Zack Barresse's Avatar
Computer Specs
Member with 5,434 posts.
 
Join Date: Jul 2004
Location: Oregon, United States
Experience: I'ma learnin'!
18-Feb-2011, 04:47 PM #3
Hi there, welcome to the board!

Meeting your specs...

Code:
Sub CheckTimeAgainstCellValue()
    With ThisWorkbook.Sheets("Sheet1")
        If VBA.Time > .Range("A1").Value Then
            .Rows(1).Delete
        End If
    End With
End Sub
If you want it more dynamic than that, you'll have to provide more details. Please be as specific as possible.

@falconMM: I would recommend that if you're going to promote other boards, you follow it up with recommendations for cross-posting. I.e. http://www.excelguru.ca/node/7.
Cookiegal's Avatar
Administrator & Malware Removal Specialist with 97,679 posts.
 
Join Date: Aug 2003
18-Feb-2011, 04:55 PM #4
Since you are now being helped elsewhere, I'm closing this thread.

falconmm,

In the future, please do not direct users who come here for assistance away to other sites.
Cookiegal's Avatar
Administrator & Malware Removal Specialist with 97,679 posts.
 
Join Date: Aug 2003
18-Feb-2011, 04:57 PM #5
Sorry, Zack. I hadn't seen your post so I won't close it but do you wish to continue here even though he's also receiving assistance elsewhere?
Zack Barresse's Avatar
Computer Specs
Member with 5,434 posts.
 
Join Date: Jul 2004
Location: Oregon, United States
Experience: I'ma learnin'!
19-Feb-2011, 04:46 PM #6
Not entirely. I don't like nor appreciate cross-posting. It becomes futile and frustrating. Thanks though.
Cookiegal's Avatar
Administrator & Malware Removal Specialist with 97,679 posts.
 
Join Date: Aug 2003
19-Feb-2011, 05:10 PM #7
That's what I thought too so I'll close it.
As Seen On

BBC, Reader's Digest, PC Magazine, Today Show, Money Magazine
WELCOME TO TECH SUPPORT GUY!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.


Tags
excel 07, macro excel column, macro help, vb script

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


WELCOME
You Are Using: Server ID
Trusted Website Back to the Top ↑