View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Rob Rob is offline
external usenet poster
 
Posts: 234
Default Pass between modules

Hi, I have tried to split a piece of code into separate modules for ease of
knowing what each element does, however, having done this, not all the code
works as expected. I'm work through the issues one by one but I'm stuck on
transferring a file's name that's been saved in module 1 to module 2.

Module 1 creates a new file and saves it with a unique name derived from the
date and time, however, when I then run code in module 2, I'd like to
display after saving this file again its name. I have declared Public
FileName As String in module 1 but regardless what I do in module 2, I can't
capture FileName declare in module 1. I have Option Explicit set in all
modules and subs aren't set to Private.

Any pointers welcome. Thanks, Rob