A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

#2: VBA to Pick Range and letter



 
 
Thread Tools Display Modes
  #1  
Old November 17th, 2006, 07:15 PM posted to microsoft.public.excel.worksheet.functions,microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.word.vba.general
TomorrowsMan
external usenet poster
 
Posts: 17
Default #2: VBA to Pick Range and letter

Thanks for your help yesterday; today, it seems to complicate way past
my VBA abilities.

We now have 7 letters (1A-7G). What they'd like to do is:

1. Auto-filter a column in Excel to the rows that would get a specific
letter. (done)
2. Click a commandbutton that would:
3. Open the Word merge document that pertains to the letter filtered
in the spreadsheet.

Somehow this seems like it should be easy, but then it is hard in
chunks. I've got it through to the filtering, and all of the letters
are built and associated, and I'm pretty sure I can code the merge
letters to run the merge as soon as the document loads (via VBA). But,

How do I tell the macro in Excel to pick just the filtered range? And,
How do I tell it in the code which merge document to open?

I could probably just use the Case member to select the letter based on
the criteria in the Excel column that contains the name of the letter,
but I'm stumped before I even get this far.....

Thanks a ton -- I learn so much in here every day, but as George
Harrison said, "the more I learn the less I know..."

TomorrowsMan

  #2  
Old November 17th, 2006, 07:45 PM posted to microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions,microsoft.public.word.vba.general
Duke Carey
external usenet poster
 
Posts: 1,027
Default #2: VBA to Pick Range and letter

In your shoes I'd give some serious thought to using Word as the VBA platform
while treating the Excel file as a database. The next step would be to use
ADO to query the Excel data, based on the desired letter, and return just
that data to Word.


"TomorrowsMan" wrote:

Thanks for your help yesterday; today, it seems to complicate way past
my VBA abilities.

We now have 7 letters (1A-7G). What they'd like to do is:

1. Auto-filter a column in Excel to the rows that would get a specific
letter. (done)
2. Click a commandbutton that would:
3. Open the Word merge document that pertains to the letter filtered
in the spreadsheet.

Somehow this seems like it should be easy, but then it is hard in
chunks. I've got it through to the filtering, and all of the letters
are built and associated, and I'm pretty sure I can code the merge
letters to run the merge as soon as the document loads (via VBA). But,

How do I tell the macro in Excel to pick just the filtered range? And,
How do I tell it in the code which merge document to open?

I could probably just use the Case member to select the letter based on
the criteria in the Excel column that contains the name of the letter,
but I'm stumped before I even get this far.....

Thanks a ton -- I learn so much in here every day, but as George
Harrison said, "the more I learn the less I know..."

TomorrowsMan


  #3  
Old November 17th, 2006, 07:57 PM posted to microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions,microsoft.public.word.vba.general
TomorrowsMan
external usenet poster
 
Posts: 17
Default #2: VBA to Pick Range and letter

Duke,

I had thought of that, but the process the data entry people ar eusing
is to put everything in the Excel spreadsheet first; I was then hoping
they wouldn't have to think about opening the Word docs at all, but
instead just trigger them from Excel.

Unless I'm missing an easier point you're making; I'm pretty new at
integrating the two applications....

Chris



Duke Carey wrote:
In your shoes I'd give some serious thought to using Word as the VBA platform
while treating the Excel file as a database. The next step would be to use
ADO to query the Excel data, based on the desired letter, and return just
that data to Word.


"TomorrowsMan" wrote:

Thanks for your help yesterday; today, it seems to complicate way past
my VBA abilities.

We now have 7 letters (1A-7G). What they'd like to do is:

1. Auto-filter a column in Excel to the rows that would get a specific
letter. (done)
2. Click a commandbutton that would:
3. Open the Word merge document that pertains to the letter filtered
in the spreadsheet.

Somehow this seems like it should be easy, but then it is hard in
chunks. I've got it through to the filtering, and all of the letters
are built and associated, and I'm pretty sure I can code the merge
letters to run the merge as soon as the document loads (via VBA). But,

How do I tell the macro in Excel to pick just the filtered range? And,
How do I tell it in the code which merge document to open?

I could probably just use the Case member to select the letter based on
the criteria in the Excel column that contains the name of the letter,
but I'm stumped before I even get this far.....

Thanks a ton -- I learn so much in here every day, but as George
Harrison said, "the more I learn the less I know..."

TomorrowsMan



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:42 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.