Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Macro one workbook to another

I have the following Macro that is a Journal Entry, when I run the macro it
opens a template and copies information from the active workbook to the
template, what I need is to run in base of the current active workbook and
not "2004 JE Worksheets NEW.xls").Activate, because this forces me to name
the file always the same way.

Let me know if i did not make myself clear

Workbooks.Add Template:= _
"C:\Documents and Settings\mestrell.000\Application
Data\Microsoft\Templates\JE BPCS upload.xlt"
Windows("2004 JE Worksheets NEW.xls").Activate


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 575
Default Macro one workbook to another

Are you looking for something like this?

Dim wSource as Workbook
Set wSource = ActiveWorkbook

Workbooks.Add Template:= _
"C:\Documents and
Settings\mestrell.000\ApplicationData\Microsoft\Te mplates\JE BPCS
upload.xlt"

wSouce.Activate

'carry on from here

Robin Hammond
www.enhanceddatasystems.com

"MESTRELLA29" wrote in message
...
I have the following Macro that is a Journal Entry, when I run the macro it
opens a template and copies information from the active workbook to the
template, what I need is to run in base of the current active workbook and
not "2004 JE Worksheets NEW.xls").Activate, because this forces me to name
the file always the same way.

Let me know if i did not make myself clear

Workbooks.Add Template:= _
"C:\Documents and Settings\mestrell.000\Application
Data\Microsoft\Templates\JE BPCS upload.xlt"
Windows("2004 JE Worksheets NEW.xls").Activate




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Macro one workbook to another

YES !!!!!!

That is IT.... THANKS FOR ALL YOUR HELP...

"Robin Hammond" wrote:

Are you looking for something like this?

Dim wSource as Workbook
Set wSource = ActiveWorkbook

Workbooks.Add Template:= _
"C:\Documents and
Settings\mestrell.000\ApplicationData\Microsoft\Te mplates\JE BPCS
upload.xlt"

wSouce.Activate

'carry on from here

Robin Hammond
www.enhanceddatasystems.com

"MESTRELLA29" wrote in message
...
I have the following Macro that is a Journal Entry, when I run the macro it
opens a template and copies information from the active workbook to the
template, what I need is to run in base of the current active workbook and
not "2004 JE Worksheets NEW.xls").Activate, because this forces me to name
the file always the same way.

Let me know if i did not make myself clear

Workbooks.Add Template:= _
"C:\Documents and Settings\mestrell.000\Application
Data\Microsoft\Templates\JE BPCS upload.xlt"
Windows("2004 JE Worksheets NEW.xls").Activate





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
saving macro from workbook to Personal Macro Workbook KrispyData Excel Discussion (Misc queries) 1 March 25th 10 05:52 PM
Combine worksheets in multiple workbook in one workbook with a macro Sam Commar Excel Discussion (Misc queries) 2 April 2nd 09 01:09 PM
Macro to copy an image (or picture) from one workbook to a new sheetin another workbook Ruchir Excel Worksheet Functions 1 July 25th 08 07:29 AM
Need a macro to copy a range in one workbook and paste into another workbook Paul Excel Programming 8 July 1st 04 07:42 AM
Excel Gurus = want a macro in 1 workbook to get info from another workbook = Read please harry Excel Programming 5 December 20th 03 03:26 AM


All times are GMT +1. The time now is 12:09 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"