Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I have a long list of values in one sheet of an Excel Workbook. The list only spans Column A & B. I have 2 cells (F2, G2) in which I enter new values to be put into the list. After entering the new values in the 2 cells I created a button that has code to look for an open row, paste the new entry, then clear the contents of the entry cells(F2, G2). Everything is working perfectly except that I have border formatting on my entry cells and that formatting also copies to the list cells. Using the VB code, is there a way to only copy the text out of the cell and past rather than copying the properties of the cell as well? I've pasted my button code as a reference. Private Sub Insert_Click() Dim x, y Do Until y = 1 If Cells(x, 1) = "" Then Range(Cells(2, 6), Cells(2, 7)).Value.Copy _ Destination:=Range(Cells(x, 1), Cells(x, 2)) Range(Cells(2, 6), Cells(2, 7)).ClearContents Worksheets("Sheet1").Range("A1").Sort _ Key1:=Worksheets("Sheet1").Columns("b"), _ Key1:=Worksheets("Sheet1").Columns("a"), _ Header:=xlGuess y = 1 End If x = x + 1 Loop ' End Do Until Loop End Sub Thanks in advance for any help. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Code to copy the formulae of one cell to all the cell in the rangewith the specific cell and columnnumber changing Options | Excel Discussion (Misc queries) | |||
Code to copy the formulae of one cell to all the cell in the rangewith the specific cell and columnnumber changing | Excel Discussion (Misc queries) | |||
How can I copy a value from a cell and paste it into another cell while adding it to the previous value in that cell | Excel Worksheet Functions | |||
I copy a formula and the results copy from the original cell | Excel Discussion (Misc queries) | |||
VBA to copy to empty cell directly below a cell when analogous cells in different column have same value as each other? | Excel Programming |