Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default problem with resize property

Hi al

I am automating excel 97 from Access 9

I am having problems with the range resize property. the relevant porition of my code is as follow

rngWork.selec
xlapp.selection.resize(0,Int(rsData!Rate_Input_Tim e)).Selec

I get a runtime error 1004 - application-defined or object-defined erro

Can anyone help pleas

I have tried to use the resize property in a number of solutions i have built but have never managed to get it to work through automation. I therefore have built work arounds which lead to much more code. I thought I would give you guys a try this time and try and get the answer once and for all

thanks for your hel
Michelle
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default problem with resize property

Michelle,

It is probably due to not qualifying every object property that you
reference with a full application qualifier. In this case, I am referring to
rsData!Rate_Input_Time.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Michelle" wrote in message
...
Hi all

I am automating excel 97 from Access 97

I am having problems with the range resize property. the relevant

porition of my code is as follows

rngWork.select
xlapp.selection.resize(0,Int(rsData!Rate_Input_Tim e)).Select

I get a runtime error 1004 - application-defined or object-defined error

Can anyone help please

I have tried to use the resize property in a number of solutions i have

built but have never managed to get it to work through automation. I
therefore have built work arounds which lead to much more code. I thought I
would give you guys a try this time and try and get the answer once and for
all.

thanks for your help
Michelle



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default problem with resize property

Thanks Bob

rsData is a recordset based on a query in the database so I'm not sure this would affect the resize property would it?

regards
michelle
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default problem with resize property

What is rsData!Rage_Input_Time

Is it something from access that resolves to an interger?

Anyway, you can't resize to zero. You have to have at least 1 row and 1
column.

if you want to not resize on row, then leave it blank

xlapp.selection.resize( ,Int(rsData!Rate_Input_Time)).Select

--
Regards,
Tom Ogilvy


"Michelle" wrote in message
...
Hi all

I am automating excel 97 from Access 97

I am having problems with the range resize property. the relevant

porition of my code is as follows

rngWork.select
xlapp.selection.resize(0,Int(rsData!Rate_Input_Tim e)).Select

I get a runtime error 1004 - application-defined or object-defined error

Can anyone help please

I have tried to use the resize property in a number of solutions i have

built but have never managed to get it to work through automation. I
therefore have built work arounds which lead to much more code. I thought I
would give you guys a try this time and try and get the answer once and for
all.

thanks for your help
Michelle



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default problem with resize property

Thanks To

rsdata is a recordse

I didn't realise that you couldn't put 0 for the row argument - I have omitted arg as suggested and it now works

thanks for your hel
REgard
Michelle


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem using filter property ub Excel Worksheet Functions 8 October 17th 07 09:32 PM
Object property/method problem Ayo Excel Discussion (Misc queries) 6 August 30th 07 10:18 PM
I could NOT resize the axis title but excel allows me to resize gr Iwan Setiyono Ko Charts and Charting in Excel 0 March 15th 06 10:34 AM
Resize Range Problem ExcelMonkey[_16_] Excel Programming 3 January 23rd 04 11:15 PM
Problem with PrintArea property Ugleeduck Excel Programming 1 December 5th 03 05:26 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"