Hi.  I want to have a file automatically check the version of another file 
that opens it to post information to it.  Information is entered into File 
A and then File A calls File B to transfer information to (i.e. a 
summary).  The code I have written in File A is:
 
        SetAttr "File B", vbReadWrite
        Workbooks.Open Filename _
        :="File B.xlsm" _
        , UpdateLinks:=0
        ActiveWorkbook.Unprotect
        Sheets("Plan Check Log").Select
        ActiveSheet.Unprotect 'unprotect sheet to write plan check results
This has been working fine but I need to be sure that users are using the 
correct version of File A to transfer information.  So I thought I would 
write a macro in File B that would run automatically when the File is 
opened: 
 
            Private Sub Workbook_Open()
           Dim myValue As Variant
'
' Auto_Open Macro
' Checks to see that correct version of checklist is being used.
'
            myValue = InputBox("Enter version number of checklist: Found on 
first page 'Start Here', upper right hand corner")
            If (myValue = "2") Then
                 Continue
            Else
                  MsgBox ("You are using the incorrect checklist! You must 
use the checklist found on the L:drive in the      Plan Check folder to 
update the Plan Check log.  Sorry for the inconvienence.")
                  End
            End If
 
However, the macro is not getting run.  Thanks for any suggestions.

-- 
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s 
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to