View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
K Dales[_2_] K Dales[_2_] is offline
external usenet poster
 
Posts: 1,163
Default How do you program so that Workbook B cannot be open unless Workbo

If Workbook B and Workbook A are both already open in the same Excel session
it is easy - From your VBA code in Workbook B, it would look like this:
ValueFromA = Workbooks("Workbook
A").Sheets(SheetName).Range(CellAddress).Value

If Workbook B is NOT already open you need to open it first:
Workbooks.Open (Filename As String, [UpdateLinks], [ReadOnly], [Format],
[Password], [WriteResPassword], [IgnoreReadOnlyRecommended], [Origin],
[Delimiter], [Editable], [Notify], [Converter], [AddToMru], [Local],
[CorruptLoad]) - see Excel help "Programming Information" for a complete
explanation of all the parameters.


"Marcello do Guzman" wrote:

so that Workbook B would check for a certain value in a worksheet in
Workbook A. If you have the VBA code for this please let me know.
Thanks in advance.


TooShyNiceGuy

You can post answer here or send me email at: