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 Help with Error Message Box code

Hi

I am working on a macro to do some copying and pasting but it relies o
the active cell of the destination sheet being blank and in a correc
column. I need help with code to bring up an error message if th
active cell is in a wrong column or has data in it. The active cel
must be in any of several columns which has a value of 1 in row 4.

My macro was created in part by the recorder and edited by me (and b
some miracle it works). I am obviously very new at this so I woul
also be grateful to hear suggestions on cleaning it up, please. Her
is what the macro is now:

Sub Macro6()
Application.Goto Reference:="scores"
Selection.Copy
Sheets("Sheet3").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone
SkipBlanks:= _
False, Transpose:=False
ActiveCell.Select
Application.CutCopyMode = False
ActiveCell.Offset(0, -6).FormulaR1C1 = "=TODAY()"
Selection.Copy
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone
SkipBlanks:= _
False, Transpose:=False
ActiveCell.Offset(-1, -5).Select
Selection.Resize(1, 5).Select
Selection.Copy
ActiveCell.Offset(1, 0).Select
ActiveSheet.Paste
Application.CutCopyMode = False
ActiveCell.Offset(0, 5).Select
End Sub


Thanks in advance for any help

--
Message posted from http://www.ExcelForum.com

 
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
Code has been interupted - error message Jeff Excel Discussion (Misc queries) 0 May 10th 07 03:23 PM
VBA - error message "Code excecution has been interupted" Jeff Excel Discussion (Misc queries) 1 March 24th 07 02:33 PM
Message box causing error in code Calligra[_2_] Excel Programming 6 July 9th 04 03:02 PM
Message box causing error in code Calligra Excel Programming 0 July 7th 04 02:46 PM
How? - Error message for turning off autofilter with code ryssa[_4_] Excel Programming 2 June 30th 04 10:12 AM


All times are GMT +1. The time now is 06:23 AM.

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

About Us

"It's about Microsoft Excel"