Results 1 to 2 of 2

Thread: Excel

  1. #1
    Join Date
    Dec 1969

    Default Excel

    Hi Folks,<BR> I am creating an excel file. However I do not know how many rows of data I will be inserting. Does anyone know how I insert an extra row dynamically? I am trying to do it the following way:<BR><BR> duosdoc.Worksheets("sheet1").Range("I1:I10").selec t<BR> Selection.EntireRow.Insert<BR><BR>However I get the error message that Selection has not been declared. If I do declare selection as a avariable it then tells me an object is required. Any help is much appreciated. <BR><BR>Cheers,<BR><BR>Neil

  2. #2
    Join Date
    Dec 1969

    Default RE: Excel

    You will probably need somewhere to say:<BR>Set Selection = duosdoc.Worksheets("sheet1").Row("1").select<BR><B R>Or something...<BR><BR>At the moment, "Select" is nothing. It&#039;s just a variable. It&#039;s not a reference to a row, which is what it must be for that set of code to work.<BR><BR>Craig.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts