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 Code runs in 2002 but not in 97!?


G'Day from sunny Oxford, UK!

Can anyone point me in the right direction please....

I have the code below which kicks off by asking the user to enter a
code which then, if correct, tells another macro to run which sends
mail to users on a list. I have the password because in Excel 97 it
sends the mails so quickly that I don't want to risk users accidentally
clicking on the send button before the mail is ready to go. The passcode
lives in cell P5 on the worksheet.

It works really well in Office 2002, but stops on the second line
starting 'mynum' in Office 97 (OK, so I just changed roles and went
from an XP machine to an NT machine!!!)

I'd really like to leave the passcode in so that the mistakes mentioned
above don't happen, but have no idea how to adapt the code so it runs in
O97.

Any ideas would be very gratefully received.

Regards,

Chris.

-------------------------------------------------------------------------------

Sub send_mail_Click()

mynum = InputBox("Please enter the password to enable the sending of
these e-mails. If you don't know it please contact Big Chris", "You
need a password to proceed...")

If mynum = "" Then
MsgBox "No data entered...", vbInformation, "Validation Code Entry
Error!"
Exit Sub
End If

Sheets("List").Select
Range("p5").Select

If CLng(mynum) = ActiveCell.value Then
Application.OnTime Now, "run_this_macro"

Else
MsgBox "Number is incorrect! Try again or contact ",
vbInformation, "Validation Code Entry Error!"

End If

Sheets("List").Select
Range("ab6").value = mynum

Sheets("List").Select
Range("a1").Select

End Sub


--
Big Chris

Very experienced with excel in general and formulae but just started to
learn VBA....and it's hard!!
------------------------------------------------------------------------
Big Chris's Profile:
http://www.excelforum.com/member.php...fo&userid=1350
View this thread: http://www.excelforum.com/showthread...hreadid=396074

 
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
vba code runs...need spaces ........ Wanna Learn Excel Discussion (Misc queries) 2 January 20th 09 12:44 PM
Code slows down after a few runs Diverse Computing[_2_] Excel Programming 2 July 21st 05 04:08 AM
Code runs every other time Mike Waldron Excel Programming 1 September 27th 03 03:54 PM
How to keep from going dizzy when my code runs TBA[_2_] Excel Programming 3 September 23rd 03 11:33 PM
Called macro runs twice in excel 2002 Tom Ogilvy Excel Programming 1 September 10th 03 02:12 PM


All times are GMT +1. The time now is 09:17 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"