Adding a new Line

  • Thread starter Thread starter cakonopka
  • Start date Start date
C

cakonopka

HI THERE ALL

HERE IS WHER I AM AT THE MONENT

Private Sub CommandButton1_Click()
Range("D16").Copy
Worksheets("Customer Details").Range("B18").Value = _
Range("D16").Value

I HAVE A SERIES OF THESE FOR THE CELLS SO WHEN I PRESS THE BUTTON AL
THE DATA GOES INTO THE TABLE

ALL I NEED IT TO DO NOW IS TO ADD A NEW ROW IN A T THE TOP AND MOVE TH
OTHER DATA DOWN SO THE NEXT DATA IS INSERTED INTO THE NEW ROW, AN
IDEAS?
CHEERS

FROM C
 
Please don't type in caps

'Range("D16").Copy
You don't have to use the copy line if you use the value propertie

Thios will copy the value and insert a new row

Worksheets("Customer Details").Range("B18").Value = _
Range("D16").Value
Worksheets("Customer Details").Range("B18").EntireRow.Insert
 
It's unclear, at least to me, where you want the row inserted???
The basic idea is
ActiveCell.Rows.Insert
or
Worksheets("Customer Details").Range("B18").rows.insert



Please don't SHOUT. Considered bad netiquette
Private Sub CommandButton1_Click()
' Range("D16").Copy 'NOT needed
ActiveCell.Rows.Insert
Worksheets("Customer Details").Range("B18").Value = _
Range("D16").Value
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top