G
Guest
I am very new with Exel
The following works, even though it might not be pretty.
But what I want to do is to be able to run this after changing the file name Follow_up.xls to, for example, 1234.xls.
The value 1234 is the sum of A3, so I put it in a variable - myFolder1 -
How do I enter it into the - Windows("Follow_up.xls").Activate - line, in the place of "Follow_up.xls"
Sub List_Req2()
Dim myFolder1 As String
Range("A3").Select
Selection.Copy
Range("G3").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
With ThisWorkbook
myFolder1 = .Worksheets("hotline").Range("G3").Value
Range("F19").Select
Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
Rows("1:1").Select
Selection.Insert Shift:=xlDown
Range("A1").Select
Windows("Follow_up.xls").Activate
Sheets("Request for Service").Select
Range("I13:J13").Select
Selection.Copy
Windows("list_Req.xls").Activate
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Range("A1").Select
Windows("Follow_up.xls").Activate
Application.CutCopyMode = False
Sheets("Hotline").Select
Range("G3").Select
Selection.ClearContents
End With
End Sub
Thanks for any help, and Happy Holidays
The following works, even though it might not be pretty.
But what I want to do is to be able to run this after changing the file name Follow_up.xls to, for example, 1234.xls.
The value 1234 is the sum of A3, so I put it in a variable - myFolder1 -
How do I enter it into the - Windows("Follow_up.xls").Activate - line, in the place of "Follow_up.xls"
Sub List_Req2()
Dim myFolder1 As String
Range("A3").Select
Selection.Copy
Range("G3").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
With ThisWorkbook
myFolder1 = .Worksheets("hotline").Range("G3").Value
Range("F19").Select
Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
Rows("1:1").Select
Selection.Insert Shift:=xlDown
Range("A1").Select
Windows("Follow_up.xls").Activate
Sheets("Request for Service").Select
Range("I13:J13").Select
Selection.Copy
Windows("list_Req.xls").Activate
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Range("A1").Select
Windows("Follow_up.xls").Activate
Application.CutCopyMode = False
Sheets("Hotline").Select
Range("G3").Select
Selection.ClearContents
End With
End Sub
Thanks for any help, and Happy Holidays