ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Getting started (https://www.excelbanter.com/excel-programming/368136-getting-started.html)

kimmrunner

Getting started
 
I have an excel application with a lot of VB macro, which I wish to convert
into VB proper, and compile down - and to work with older versions of
windows,and office.
I only have VB5 but will buy a later version if I can discover what I need.

I notice a lot of code fragments on the web that set an EXCEL.APPLICATION,
but the object isnt recognised in my VB . What object library do I need? how
can I get VB to recognise it?

Whilst I can see an MSWORD.olb,and one for powerpoint I cant see an object
library for excel on this computer - should there be one?
can i download it from somewgere?

How do I get off first base?

Thanks in anticipation

Jim Cone

Getting started
 
You will have to purchase and install Excel.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware


"kimmrunner"

wrote in message
I have an excel application with a lot of VB macro, which I wish to convert
into VB proper, and compile down - and to work with older versions of
windows,and office.
I only have VB5 but will buy a later version if I can discover what I need.

I notice a lot of code fragments on the web that set an EXCEL.APPLICATION,
but the object isnt recognised in my VB . What object library do I need? how
can I get VB to recognise it?

Whilst I can see an MSWORD.olb,and one for powerpoint I cant see an object
library for excel on this computer - should there be one?
can i download it from somewgere?
How do I get off first base?
Thanks in anticipation

kimmrunner

Getting started
 
I have excel - several versions - most recent an office professional from
dell lin the last month.

But how do I find the object libraries, or install them? - what is the
missing step?


"Jim Cone" wrote:

You will have to purchase and install Excel.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware


"kimmrunner"

wrote in message
I have an excel application with a lot of VB macro, which I wish to convert
into VB proper, and compile down - and to work with older versions of
windows,and office.
I only have VB5 but will buy a later version if I can discover what I need.

I notice a lot of code fragments on the web that set an EXCEL.APPLICATION,
but the object isnt recognised in my VB . What object library do I need? how
can I get VB to recognise it?

Whilst I can see an MSWORD.olb,and one for powerpoint I cant see an object
library for excel on this computer - should there be one?
can i download it from somewgere?
How do I get off first base?
Thanks in anticipation


Jim Cone

Getting started
 
I don't use VB, I use various office versions. In Tools | References, there are references
to Microsoft Office xx Object Library and Microsoft Excel xx Object library.

The usual way to access Excel is to create an object reference to the Excel application
and then use that reference in your code...

Dim appXL as Object
Set appXL = CreateObject("Excel.Application")

Maybe this MS article will be of some help...

"Communicating with Other Applications"
http://tinyurl.com/q8srs
--
Jim Cone
San Francisco, USA
http://www.officeletter.com/blink/specialsort.html


"kimmrunner"

wrote in message
I have excel - several versions - most recent an office professional from
dell lin the last month.

But how do I find the object libraries, or install them? - what is the
missing step?


"Jim Cone" wrote:

You will have to purchase and install Excel.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware


"kimmrunner"

wrote in message
I have an excel application with a lot of VB macro, which I wish to convert
into VB proper, and compile down - and to work with older versions of
windows,and office.
I only have VB5 but will buy a later version if I can discover what I need.

I notice a lot of code fragments on the web that set an EXCEL.APPLICATION,
but the object isnt recognised in my VB . What object library do I need? how
can I get VB to recognise it?

Whilst I can see an MSWORD.olb,and one for powerpoint I cant see an object
library for excel on this computer - should there be one?
can i download it from somewgere?
How do I get off first base?
Thanks in anticipation


NickHK

Getting started
 
Jim,
What's the point of setting a reference (early binding) then using Object
for everything ?

To the OP:
If you set a reference as to the Excel library (ProjectReferences), then
Dim XL as Excel.Application
Set XL=New Excel.Application
With XL
'etc....

This way you get the benefit of Intellisense to help with the XL object
model.

NickHK


"Jim Cone" wrote in message
...
I don't use VB, I use various office versions. In Tools | References,

there are references
to Microsoft Office xx Object Library and Microsoft Excel xx Object

library.

The usual way to access Excel is to create an object reference to the

Excel application
and then use that reference in your code...

Dim appXL as Object
Set appXL = CreateObject("Excel.Application")

Maybe this MS article will be of some help...

"Communicating with Other Applications"
http://tinyurl.com/q8srs
--
Jim Cone
San Francisco, USA
http://www.officeletter.com/blink/specialsort.html


"kimmrunner"

wrote in message
I have excel - several versions - most recent an office professional from
dell lin the last month.

But how do I find the object libraries, or install them? - what is the
missing step?


"Jim Cone" wrote:

You will have to purchase and install Excel.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware


"kimmrunner"

wrote in message
I have an excel application with a lot of VB macro, which I wish to

convert
into VB proper, and compile down - and to work with older versions of
windows,and office.
I only have VB5 but will buy a later version if I can discover what I

need.

I notice a lot of code fragments on the web that set an

EXCEL.APPLICATION,
but the object isnt recognised in my VB . What object library do I need?

how
can I get VB to recognise it?

Whilst I can see an MSWORD.olb,and one for powerpoint I cant see an

object
library for excel on this computer - should there be one?
can i download it from somewgere?
How do I get off first base?
Thanks in anticipation





All times are GMT +1. The time now is 01:30 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com