blackwell7six
New Member
- Joined
- Jun 15, 2018
- Messages
- 1
Forgive me, I'm new to VBA. I have enough experience in programming, but it's not my bag. I'm currently trying a macro to copy data from one sheet to a table, and that data includes a NOW() function formatted the way I want. When I copy it over to the table, it's just copying the NOW() and I want it as a string. In other words, when I copy it over, it's constantly changeing the date of the other entries to the current date/time. I want to preserve the date and time I made the entry. Here's my code:
Range("B2,B3,B7,B11").Select
Range("B11").Activate
Selection.Copy
Sheets("Database").Select
Range("A2").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Rows("2:2").Select
Application.CutCopyMode = False
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Sheets("Intake").Select
Range("B2,B4,B5,B6,B7,B8,B9,B10,B11").Select
Range("B11").Activate
Selection.ClearContents
How can I change this to do what I want it to do?
Thanks in advance.
Range("B2,B3,B7,B11").Select
Range("B11").Activate
Selection.Copy
Sheets("Database").Select
Range("A2").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Rows("2:2").Select
Application.CutCopyMode = False
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Sheets("Intake").Select
Range("B2,B4,B5,B6,B7,B8,B9,B10,B11").Select
Range("B11").Activate
Selection.ClearContents
How can I change this to do what I want it to do?
Thanks in advance.