LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 709
Default A macro code question from a novice

The following is my code for a macro I want to run on a protected worksheet.
My intent is for the macro to first unprotect the worksheet, then insert a
copy of the person's scanned signature on to the worksheet after they answer
the question "Are you sure you want to sign your timecard?", and then
reprotect the worksheet. When the code runs, I'm getting an error message
"Compile error: Expected End Sub". I'm sure it's due to a mistake (or more
than one) I've made. If anyone has time, would you please help me locate my
error(s)?

Thanks and have a wonderful holiday season!

Sub KSmith_signature()
'
' KSmith_signature Macro
' Macro recorded 12/24/2007 by Richard
'

'
Worksheets(SMITH.XLS).Unprotect Password:="simple"
Sub AskAndDo()
If MsgBox("Are you sure you want to sign your timecard?", vbYesNo +
vbQuestion) = vbNo Then Exit Sub
Else
Sheets("Sheet3").Select
ActiveSheet.Shapes("Picture 2").Select
Selection.Copy
Sheets("Master").Select
Range("A32:I34").Select
ActiveSheet.Paste
Selection.ShapeRange.IncrementLeft 54.75
Range("I26").Select
End If
End Sub
Worksheets(BEARDSLEE.XLS).Protect Password:="simple"
End Sub
 
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
Novice formula question Denise Excel Discussion (Misc queries) 10 November 7th 07 08:43 AM
Novice IF and COUNT question (I think) Robin Excel Worksheet Functions 5 October 3rd 07 11:00 PM
Very Novice Excel user with security question Ralph Malph Excel Discussion (Misc queries) 5 March 23rd 06 06:33 PM
Excel Novice, Stupid Question, but help! [email protected] Excel Discussion (Misc queries) 6 February 13th 06 03:14 AM
drop down list - a question from novice striker_69 Excel Discussion (Misc queries) 5 September 19th 05 06:59 PM


All times are GMT +1. The time now is 03:08 PM.

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"