Need help getting data from an excel file 
Author Message
 Need help getting data from an excel file

Actually this is the command I want to work from within an Outlook module

Application.Excel.Workbooks.Open "f:\mailing list\lists\testlist.XLS"
mail_name = Range("C1")

Obviously, I wouldn't be posting this message if it worked like this.  So,
knowing that this is what I want, can anyone help me get it to work?

Thanks
George Mizzell



Mon, 22 Nov 2004 12:50:37 GMT  
 Need help getting data from an excel file
Never mind, I found it in the Wrox Press Outlook 2000 VBA programmers
reference manual.

Thanks
George


Quote:
> Actually this is the command I want to work from within an Outlook module

> Application.Excel.Workbooks.Open "f:\mailing list\lists\testlist.XLS"
> mail_name = Range("C1")

> Obviously, I wouldn't be posting this message if it worked like this.  So,
> knowing that this is what I want, can anyone help me get it to work?

> Thanks
> George Mizzell



Mon, 22 Nov 2004 13:37:46 GMT  
 Need help getting data from an excel file
You need to return an object you can work with:

    Set objWB = Application.Excel.Workbooks.Open "f:\mailing list\lists\testlist.XLS"
    mail_name objWB.Worksheets(1).Range("C1")

--
Sue Mosher, Outlook MVP
   Outlook and Exchange Solutions
   at http://www.slipstick.com

Quote:

> Actually this is the command I want to work from within an Outlook module

> Application.Excel.Workbooks.Open "f:\mailing list\lists\testlist.XLS"
> mail_name = Range("C1")

> Obviously, I wouldn't be posting this message if it worked like this.  So,
> knowing that this is what I want, can anyone help me get it to work?

> Thanks
> George Mizzell



Mon, 22 Nov 2004 19:35:32 GMT  
 Need help getting data from an excel file
Thanks Sue.  That is a bit cleaner than what I came up with.
Thanks
George



You need to return an object you can work with:

    Set objWB = Application.Excel.Workbooks.Open "f:\mailing
list\lists\testlist.XLS"
    mail_name objWB.Worksheets(1).Range("C1")

--
Sue Mosher, Outlook MVP
   Outlook and Exchange Solutions
   at http://www.slipstick.com


Quote:
> Actually this is the command I want to work from within an Outlook module

> Application.Excel.Workbooks.Open "f:\mailing list\lists\testlist.XLS"
> mail_name = Range("C1")

> Obviously, I wouldn't be posting this message if it worked like this.  So,
> knowing that this is what I want, can anyone help me get it to work?

> Thanks
> George Mizzell



Tue, 23 Nov 2004 10:34:09 GMT  
 Need help getting data from an excel file
Sue

I tried to copy and paste your line below into Outlook macro editor and it
turns the first line red indicating a syntax error.  I can't see anything
that is wrong with it - can you?  Also, I didn't see an = mark on the 2nd
line - Is one needed?

thanks
George



You need to return an object you can work with:

    Set objWB = Application.Excel.Workbooks.Open "f:\mailing
list\lists\testlist.XLS"
    mail_name objWB.Worksheets(1).Range("C1")

--
Sue Mosher, Outlook MVP
   Outlook and Exchange Solutions
   at http://www.slipstick.com


Quote:
> Actually this is the command I want to work from within an Outlook module

> Application.Excel.Workbooks.Open "f:\mailing list\lists\testlist.XLS"
> mail_name = Range("C1")

> Obviously, I wouldn't be posting this message if it worked like this.  So,
> knowing that this is what I want, can anyone help me get it to work?

> Thanks
> George Mizzell



Wed, 24 Nov 2004 07:36:52 GMT  
 Need help getting data from an excel file
Don't expect to find clean lines in newsgroup posts. You need the filename all on one line.

Yes, my typo on the second line.

--
Sue Mosher, Outlook MVP
   Outlook and Exchange Solutions
   at http://www.slipstick.com

Quote:

> Sue

> I tried to copy and paste your line below into Outlook macro editor and it
> turns the first line red indicating a syntax error.  I can't see anything
> that is wrong with it - can you?  Also, I didn't see an = mark on the 2nd
> line - Is one needed?

> thanks
> George



> You need to return an object you can work with:

>     Set objWB = Application.Excel.Workbooks.Open "f:\mailing
> list\lists\testlist.XLS"
>     mail_name objWB.Worksheets(1).Range("C1")

> --
> Sue Mosher, Outlook MVP
>    Outlook and Exchange Solutions
>    at http://www.slipstick.com



> > Actually this is the command I want to work from within an Outlook module

> > Application.Excel.Workbooks.Open "f:\mailing list\lists\testlist.XLS"
> > mail_name = Range("C1")

> > Obviously, I wouldn't be posting this message if it worked like this.  So,
> > knowing that this is what I want, can anyone help me get it to work?

> > Thanks
> > George Mizzell



Wed, 24 Nov 2004 08:08:32 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. help needed getting Excel data into TSV Actual Work

2. URGENT Need help with getting data from text files

3. URGENT Need help with getting data from text files

4. URGENT Need help with getting data from text files

5. Help - Simply Getting Data from Extrenal Data Files (not from Access Data Base)

6. need help: Open Excel, run macro, save file, close Excel

7. HELP! Getting data to Excel Worksheet

8. HELP: Getting table data from EXCEL via Exel OBJECT and then dumping result in Flexgrid

9. Need help getting data out of a dbgrid control

10. Need help getting com port data being sent by another pgm

11. Newbie needs some help getting data FROM an html

12. Help with getting a report to print the data I need

 

 
Powered by phpBB® Forum Software