Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / General Excel Questions / March 2008

Tip: Looking for answers? Try searching our database.

Run macro only if Field E10 = "WO ID" and AB10 = "Spec Sizing"

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ldiaz - 15 Mar 2008 19:10 GMT
hello all.

I want to run a macro only:
if Field E10 = "WO ID" and AB10 = "Spec Sizing"

if field are different then it must show a message saying that the file is
not the correct one.

please help

Thanks
Signature

Lorenzo Díaz
Cad Technician

Mike H - 15 Mar 2008 19:37 GMT
Maybe this,

Right click the sheet tab, view code and paste this in

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Or IsEmpty(Target) Then Exit Sub
   If Not Intersect(Target, Range("E10,AB10")) Is Nothing Then
       If Range("E10").Value = "WO OD" And Range("AB10").Value = "Spec
Sizing" Then
           MsgBox "Macro OK to go"
           'do something
       Else
           MsgBox "wrong file"
       End If
End If
End Sub

Mike

> hello all.
>
[quoted text clipped - 7 lines]
>
> Thanks
ldiaz - 15 Mar 2008 20:26 GMT
my macro needs Ctrl + m key to run,

and start llike this:

Sub Shipping()
' Keyboard Shortcut: Ctrl+m
'start Macro
Statement
'End macro
End Sub

where do I need to put your code?

Signature

Lorenzo Díaz
Cad Technician

> Maybe this,
>
[quoted text clipped - 26 lines]
> >
> > Thanks
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.