PC Review


Reply
Thread Tools Rate Thread

#2: VBA to Pick Range and letter

 
 
TomorrowsMan
Guest
Posts: n/a
 
      17th Nov 2006
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

 
Reply With Quote
 
 
 
 
=?Utf-8?B?RHVrZSBDYXJleQ==?=
Guest
Posts: n/a
 
      17th Nov 2006
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
>
>

 
Reply With Quote
 
TomorrowsMan
Guest
Posts: n/a
 
      17th Nov 2006
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
> >
> >


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
range pick =?Utf-8?B?Q3VydA==?= Microsoft Excel Programming 1 28th Mar 2007 11:58 AM
Re: How to pick out a Range of #'s Max Microsoft Excel Discussion 4 20th Dec 2006 01:57 AM
#2: VBA to Pick Range and letter TomorrowsMan Microsoft Excel Worksheet Functions 2 17th Nov 2006 07:57 PM
#2: VBA to Pick Range and letter TomorrowsMan Microsoft Excel Misc 2 17th Nov 2006 07:57 PM
loop through cells in a range and pick up corresponding cell values in another range patrice.cezzar@gmail.com Microsoft Excel Programming 9 19th Oct 2006 05:11 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:16 PM.