Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Richard Torres   on Dec 21 In MS Office Category.

  
Question Answered By: Mena Schmidt   on Dec 21

Thanx for the suggestions, but I am afraid this problem may be a
little more elusive. I have tried #1 below - no effect. I had
tried #2 in different ways - the statement

ThisWorkbook.Sheets("Whatever").Range("D33:K34").Select

is not being allowed in my VBA. After the ..("Whatever"). I am used
to having the VBA options pop up, however, no option at all pop up.

I have even tried putting message boxes showing the ActiveWorkbook
just after the Range Selection statements and just prior to the
pasting statement - and the alternate (incorrect file  A) file name
shows up in the msgbox. It seems that when running the file B macro
from within the VB editor, their seems to be some relationship with
file A (since file B was opened within a macro  in file A). There is
a definite reason why running a macro in file B, with no known
references to file A, there is a switching of activeworkbooks.

The thing that I am suspicious of is that when I "step" through the
macro by pressing the F8 button, after the "pasting" statement, I go
through 2 user defined functions before the next macro line of code
runs. One is a function to return the color index of the cell/cells
I am dealing with, while the other is a function to count the cells
of a particular color. These functions were in both file A & B of
the same name, but I have since renamed the function in file B to a
different name. I believe that I had changed all references to the
new function call name, however, when running the macro in file B,
stepping through, I get diverted to the original function in file
A. Sorry for the wordiness, and I appreciate you help.

Share: 

 

This Question has 2 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Multiple File Calling Or get search suggestion and latest updates.


Tagged: