Question : Remove unwanted information during copy and paste process

Hi,

Need Experts help to rectify this problem. I'm creating a new row for task entry by clicking at selected cell in Column  B. The Calendar will pop-up, once the date is selected the macro will replicate the row-7 as my new row. The problem is, the new row shouldn't copy the C7's cell information.

The newly crated rows shouldn't have any information from Row-7 except the formulas and cells format. Currently everything works well but not for cell-C.

Hope Expert can help me.

I've attache the file and also the script that was used for your perusal. Please let me know if you need more clarification.
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
Private Sub Calendar1_Click()
  Dim ShObj As Worksheet
  
  Set ShObj = ThisWorkbook.Worksheets("Detail Task")
  ShObj.Rows(7).Copy
  
  ShObj.Rows(ActiveCell.Row).Select
  ActiveCell.Insert shift:=xlDown
  ShObj.Cells(ActiveCell.Row, 2) = Calendar1.Value
  ShObj.Range(ShObj.Cells(ActiveCell.Row, 4), ShObj.Cells(ActiveCell.Row, 7)) = ""
  Application.CutCopyMode = False
  Unload Me
End Sub

Answer : Remove unwanted information during copy and paste process

Can you not simple add

Range("C7") = ""

so that the C7 appears blank?

Desi
Random Solutions  
 
programming4us programming4us