View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Andy Andy is offline
external usenet poster
 
Posts: 414
Default Version of Ms Excel - using excel programming via vb 6

Sorry but I don't understand.

Do I have to remove also the reference and replacing the variables with
constants?
For example :
With XlsApp.Selection.Borders(xlEdgeBottom) - With
XlsApp.Selection.Borders(9)

Is it better or not?

Thank you

"Bob Phillips" wrote:

Andy,

If you change all of the object

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Andy" wrote in message
...
Hi Bob,

I tried to declare as Object as advised by another friend.
I don't understand if I also have to the reference to the Microsoft Excel

11
Library as AA2e72E suggest or it is sufficient to change only the
declaration.

Thank you


"Bob Phillips" wrote:

By the way, the problem is probably caused by the fact that Excel 2003

has a
different version of the object library, and your code references the

old
version.

Moving to late binding, as I suggest, overcomes this sort of problem.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Bob Phillips" wrote in message
...
Just change

Dim XlsApp As Excel.Application

to

Dim XlsApp As Object

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Andy" wrote in message
...
Hello everybody,

I formatted my notebook because it had problems.
Before I had Win2000 and Office 2000, now I have Win XP and Office

2003.

The problem is that I have various projects in which I used

following VB
6
code to open dinamically Excel and write in.

"..
'I try open excel
Set XlsApp = GetObject(, "Excel.Application") 'look for a

running
copy
of Excel

If Err.Number < 0 Then 'If Excel is not running then
Set XlsApp = CreateObject("Excel.Application") 'run it
End If
Err.Clear ' Clear Err object in case error occurred.

On Error GoTo Error_Excel_Mng

..."

I have seen that recompiling (make Exe) and releasing the software

on
customer's pc having Win 2000 and especially Office 2000 my program

no
more
work correctly.
I think because the vb reference is 'Microsoft Excel 11.0 Object
Library'.

Our helpline says that I can't install Office 2000 after Office

2003.

I ask you which is the better solution that I can use.
I prefer not to return to have my laptop with previous versions

vecchie
or
to need another old pc.

Thank you very much.

Andy