Path: csiph.com!usenet.pasdenom.info!gegeweb.org!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: GS Newsgroups: comp.lang.basic.visual.misc Subject: Re: Run-time error '1004': Application-defined or object-defined error Date: Tue, 10 Jul 2012 11:42:51 -0400 Organization: A noiseless patient Spider Lines: 48 Message-ID: References: <5c454016-0768-4245-a2be-ddab885882cb@googlegroups.com> <3f392bc0-ccdf-46a7-a9f6-b1bc53cac8ff@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15"; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Tue, 10 Jul 2012 15:42:48 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="515241ba2219a6b0f2c7352426c8b07f"; logging-data="3010"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/nsz+D5c+uLZ3v2sweHx8k" X-Antivirus-Status: Clean X-Newsreader: MesNews/1.08.03.00-gb X-Antivirus: avast! (VPS 120710-0, 07/10/2012), Outbound message X-Face: G"ln~:.wBqHZznO'(lJjjprxGYAjIF7#^u)lx,@"H'F#uXm%j`T6kxat5rq092aW;K*#m4jZ(2aW$34N&B&E@ j~tjGV-aC18j1y>zi.\[ZGXsd Cancel-Lock: sha1:7abBbG74o9dHxwLKzct4k916X3A= X-ICQ: 543516788 Xref: csiph.com comp.lang.basic.visual.misc:1273 Actually, you're asking in the wrong forum. This is a classic VB forum, NOT an Excel programming forum... (ie: microsoft.public.excel.programming) ..where you should provide a full explanation of what you're trying to accomplish. I don't know what you mean by "when I sent it", because that code fires as an event that occurs whenever the user makes changes (ie: edits) to the cells on the worksheet. I don't understand the syntax you're using here as it's NOT proper VBA. For example... 'MsgBox timeStamp.Address ..what is "'" in the above line of code? I doubt this compiled as typed and so surely would throw an error when executed. I presume you are not using 'Option Explicit' at the top of your code windows. It also looks like you did a copy/paste of this code from a webpage. Try this rewrite... Private Sub Worksheet_Change(ByVal Target As Range) 'Bail out if not the correct column (edit to suit) If Intersect(Target, Range("C:C")) Is Nothing Then Exit Sub 'MsgBox Target.Address With Target.Offset(0, -2) '//store timestamp 2 columns to the left If .Value = "" Then MsgBox "Nothing in there": .Value = Now 'MsgBox .Value End With End Sub -- Garry Free usenet access at http://www.eternal-september.org ClassicVB Users Regroup! comp.lang.basic.visual.misc microsoft.public.vb.general.discussion