Hello,
I'm having a problem with sending commands between Excel workbooks that I've never had before.
I have two excel workbooks open and I need to do a very simple copy from one workbook and paste to the other. Something I've done using MS tens of thousands of times by this point.
One file is an excel workbook, the other is a CSV file that is sent to me through my job's database and automatically opened.
The data I need to copy is in File A.
I set the focus to File A. MS actually goes to File A just fine.
It correctly selects the range I need to copy in File A, but for some odd reason it performs the copy in FILE B.
The macro is written correctly. I am not inadvertently telling it to copy the range in File B.
Any idea what this is about?
(NOTE: I know there are native excel functions in MS, but for work related reasons, I have to do it with both workbooks open.)
Thanks,
RJ
Strange Problem with Microsoft Excel & MS
Moderators: JRL, Dorian (MJT support)
Re: Strange Problem with Microsoft Excel & MS
Update:
So I did some playing around with the macro, (playing with window settings, handles, etc.)
Macro Scheduler is behaving as if it doesn't even see the CSV file (aka File A).
It's weird, because it shows File A in the "Window Title" drop down box in the "SetFocus" dialog box.
So I did some playing around with the macro, (playing with window settings, handles, etc.)
Macro Scheduler is behaving as if it doesn't even see the CSV file (aka File A).
It's weird, because it shows File A in the "Window Title" drop down box in the "SetFocus" dialog box.
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: Strange Problem with Microsoft Excel & MS
Almost impossible to guess without seeing code to see what you mean. A screencast would help.
But sounds like an issue with a SetFocus, perhaps matching a different window - perhaps the match is not specific enough and it's seeing a different window, perhaps you need to set WF_TYPE. Again, it's all guess work without being able to see the code and maybe some screenshots.
I would be using the native XL functions. You can still have both workbooks open. So not sure what you mean there.
But sounds like an issue with a SetFocus, perhaps matching a different window - perhaps the match is not specific enough and it's seeing a different window, perhaps you need to set WF_TYPE. Again, it's all guess work without being able to see the code and maybe some screenshots.
I would be using the native XL functions. You can still have both workbooks open. So not sure what you mean there.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?