Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


How to call a Procedure in different *.xls file?

joelwhipjoelwhip Member Posts: 1
I have several Excel files that I call up individually, then trigger a series of sub routines, then save & close. Using "call" or "" I haven't been successful in linking them to run one after the other when trying to call the procedure from File2.xls. From File1.xls I've entered the proper file names in column A for the series of *.xls files I'm tring to link together - and using a For/Next statement I am able to load the next desired file into Excel, but cannot run a desired sub routine that resides in a module within the 2nd file.

Example: Workbooks.Open ("E:" & Variable1) will open a file titled in cell A1 and assigned to Vairable1...then
Application.Run ("'E:' & PairName!Procedure2) will not run Procedure2 from the called-up file. I expect my syntax is incorrect. Can anyone help?
Thank you - Joel


  • Chris BrownChris Brown USAMember Posts: 4,624 ✭✭

    _ ( ) free ebooks and video tutorials about { Ruby C Visual Basic Scratch Swift Go Visual Basic .NET PL/SQL MATLAB Perl JavaScript C++ Assembly Python Delphi R PHP Objective-C C# Java Apex Rust Scheme Prolog VBScript Lua Clojure ML Erlang LabVIEW ABAP Ada SAS Fortran COBOL Awk Scala D Transact-SQL Lisp Crystal Dart FoxPro Kotlin Bash Alice F# Logo Hack Julia } ____________

Sign In or Register to comment.