Jump to content

Need help with excel and VB


Recommended Posts

Guest Phillip R
Posted

I'm having issues exporting a range from excel to file, I don't want to copy

the entire spreadsheet or a whole row just a range.

 

I tried this Print #FileNum, ( Range("2:1,10:2").Select)

 

Another question is do iterate through the cells

Dim firstcell as string

Dim lastcell as string

Dim MyRow as string

for firstcell = A2 to lastcell

If Range(firstcell).value <> ""

Myrow =(firstcell, lastcell)

Print # FileNum, (Range(firstCell, lastcell)

End if

Next firstcell

  • Replies 1
  • Created
  • Last Reply

Popular Days

Guest Pegasus \(MVP\)
Posted

Re: Need help with excel and VB

 

 

"Phillip R" <phillip@philliprosenbaum.com> wrote in message

news:62535DFF-5B2C-4F48-806F-4102F636AEDE@microsoft.com...

> I'm having issues exporting a range from excel to file, I don't want to

> copy

> the entire spreadsheet or a whole row just a range.

>

> I tried this Print #FileNum, ( Range("2:1,10:2").Select)

>

> Another question is do iterate through the cells

> Dim firstcell as string

> Dim lastcell as string

> Dim MyRow as string

> for firstcell = A2 to lastcell

> If Range(firstcell).value <> ""

> Myrow =(firstcell, lastcell)

> Print # FileNum, (Range(firstCell, lastcell)

> End if

> Next firstcell

>

 

I would try posting in a scripting newsgroup.


×
×
  • Create New...