vbscript >> Inserting a blank line in Excel

by Sean » Sun, 16 Nov 2003 01:18:00 GMT

Hello, I have an asp page which creates an Excel sheet in
which I copy some data from a recordset. After I have
done this I would like to insert some blank lines in
between the data. I tried the command "Selection.Insert
Shift:=xlDown" but it seems VBscript does not support
it. Any ideas on how I can insert a blank row from
vbScript into an excel file?

Thanks,
Sean

vbscript >> Inserting a blank line in Excel

by Dave Patrick » Sun, 16 Nov 2003 01:31:01 GMT


Try

Selection.Insert -4121

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft MVP [Windows NT/2000 Operating Systems]

Similar Threads

1. how to automatically insert blank lines in between non-blank lines - Excel

2. Inserting blank lines breaks lines of code

I have a big VS 2002/2003 annoyance, and wondering if there is a way to turn 
it off:

Put your cursor at the start of an indented line of code inside a function. 
(right before the first character, not at the left margin) Now press Enter.

It does insert a blank line, but it also moves your cursor 6 characters to 
the right, so that it is no longer at the beginning of the statement. If you 
press Enter again, you've now busted apart the line of code at a strange 
place.

Huge, huge frustration when you want to insert 3 or 4 lines, and you end up 
mangling your code.
This works as expected in VB6, and I'm having a hard time breaking the 
habit. In VB6, your cursor stays at the same vertical column, and you can 
insert multiple lines by hitting Enter repeatedly.

Any solution to this? Anyone know if this behavior is the same in VS 2005?
Thanks!! 


3. macro to insert blank line when lines sum to zero - Excel

4. Insert text before each line, append text after each line and insert blank line between each line

Can anyone help me on this.
I am doing a net view>view.bat. I then want to copy ini file from
computer, rename it to computername.ini, then go on to the next line on
until I get to the end of the file.

I want to convert this
//computer1
//computer2
..

to

copy \\computer1\c$\path/file.ini
ren file.ini computer1.ini
copy \\computer1\c$\path/file.ini
ren file.ini computer2.ini
etc.

So I would like to insert befor each line copy
Then append each line with \c$\path\file.ini
Then insert a line to ren file.ini to the computer I copied it from
.ini

Thanks,
Ciscoguy

5. Inserting Data without blank lines

6. How to INSERT BLANK LINES?

Hi all,

I have created a report with "Company Logo in the header section", "Terms
and Conditions in Footer section" and "Invoice Details in Details section".

Problem
If there is just one line or few lines the details section prints lines only
for that area.The Deatils vary for each invoice.

Requirement
I need to fill up the rest of page completely in Details section till the
footer with blank lines so that the page looks complete.

Thanks
Clive


7. inserting blank line - Word VBA

8. Inserting blank lines into a Range

Hi,

I'm currently writing code in Access97 to format a Word
document.  I have a range(currently the entire document)
and am trying to replace and format this document based on
values  in a source doument.  Within this range, I'm trying
to move to the end of some text I've just inserted within a
range, and  and insert a blank line.  When I record the
macro in Word it looks like this:
   Selection.EndKey Unit:=wdLine
    Selection.TypeParagraph
    Selection.TypeParagraph