Hi,
I have got a UserForm set up to select a range (using RefEdit), amongst other things.
When I hit the 'Enter' button, I want the range to that I have selected to be pasted onto the new sheet.
I have made sure that the RefEdit.Value is converted to a Range prior to copying, but I am having difficulty making it work. My current code is below:
If anyone can help out, I would be very grateful!
I have got a UserForm set up to select a range (using RefEdit), amongst other things.
When I hit the 'Enter' button, I want the range to that I have selected to be pasted onto the new sheet.
I have made sure that the RefEdit.Value is converted to a Range prior to copying, but I am having difficulty making it work. My current code is below:
Code:
Dim StdRange As Range
Set StdRange = Range(Me.StandardRefEdit.Text)
Name = "Standard " + StdIDTxt.Text
Sheets.Add.Name = "Standard " + StdIDTxt.Text
Range("StdRange").Copy
Sheets(Name).Activate
Range("D1:E" & Lastrow).Select
Selection.Paste
Rows(1).EntireRow.Delete
If anyone can help out, I would be very grateful!