Google
 
Webnews.only-4-geeks.com
Interesting places
news.only-4-geeks.com Forum Index » Excel

Checking what calls a workbook

 
Jump to:  
 
Guest
PostPosted: Thu Aug 07, 2008 1:40 pm    Post subject: Checking what calls a workbook
       
Hello. I have been pointed in this Group's direction by another
group...

I currently use the following code to check if a workbook called
Criticals_creator is calling the one that opens and run/not run a
macro accordingly by forcing an error:


Private Sub Workbook_Open()


On Error GoTo IsClosed


If Not Workbooks("Criticals_creator") Is Nothing Then
Worksheets("RFQ").Activate
Exit Sub
End If


IsClosed:
Application.Visible = False
WIP.Show


End Sub


Unfortunately, the workbook containing "RFQ" can also be called by a
couple of VBA apps (from SolidWorks) that need to update it.
Does anybody know of a way that I can get this macro to run only if
"RFQ" is opened by a user manually? Or get it to create the same
error
to skip the macro if called from a vba app?


Kind regards


Andy
 

Page 1 of 1 .:.

Google
 
Webnews.only-4-geeks.com

Windows Update | C++ | C | PHP | JavaScript | Photoshop | Programming | Windows 2000 | Python | Windows XP | Object | Flash | Flash - ActionScript | Paint Shop Pro | Excel | PowerPoint | Access | Word | Windows 98 | Internet Explorer 6.0 | CorelDraw12 | Java | XML | asm x86 | Linux Mandrake | Linux RedHat | Outlook |  | news from newsgroups |_ | s

Web Templates

Awesome Website Templates ©

mieszkanie kraków Rapidshare przekształcenie spółki agencja hostess kalkulator kredytowy