Hello all!
I am really banging my head on a wall....
I have a macro, that generates a worksheet based on the users input. It generates to a template worksheet, and is then transfered to a
"dumbed down" worksheet. The problem is, they can, and do, initiate the same search twice. This results in a "Run-Time" error. Here is the
bit of code that transfers the data from the "Template".
The Template is named based on the users query. Ex: Input Query (value1) is "Hammer", sheet transfer name is "Hammer-DATA"
ANY and ALL help would be appreciated!!!!
Thanks
Sub XferSht()
Dim value1 As String
Dim value2 As String
Application.DisplayAlerts = False
value1 = ActiveSheet.Name
Sheets.Add
ActiveWorkbook.ActiveSheet.Name = "Sheet1"
Sheets(value1).Range("A79:O1999").Copy
ActiveWorkbook.Sheets("Sheet1").Range("A1").PasteSpecial Paste:=xlPasteValues
Sheets(value1).Range("A79:O1999").Copy
ActiveWorkbook.Sheets("Sheet1").Range("A1").PasteSpecial Paste:=xlPasteFormats
ActiveWorkbook.ActiveSheet.Name = value1 & "-DATA"
Sheets(value1).Delete
value2 = ActiveSheet.Name
End Sub
Bookmarks