TampaStorm
08-05-2019, 07:38 AM
First of all, first time here. Used to use another site, but they had an extremely unfriendly moderator so many of us are leaving. :hi:
I'm getting in to some pretty intricate spreadsheets now which require me to learn vba. I seem to be making a rather simple problem incredibly difficult for myself. All I want to do is deselect the cells I pasted and move it to k3. I appreciate your help ahead of time. To have people so willing to help is AMAZING!!
Here's just the top part of my code. I want to insert it at the bottom of this here...
Sub CopyAUG() Dim Fname As String
Dim SrcWbk As Workbook
Dim DestWbk As Workbook
Set DestWbk = ThisWorkbook
Fname = Application.GetOpenFilename(FileFilter:="Excel Files (*.xls*), *.xls*", Title:="Select a File")
If Fname = "False" Then Exit Sub
Set SrcWbk = Workbooks.Open(Fname)
Dim answer As Integer
answer = MsgBox("Did You Pick The Correct File?", vbQuestion + vbYesNo)
If answer = vbNo Then Exit Sub
MsgBox "Your Screen May Look Frozen While Importing." & vbNewLine & vbNewLine & "Just Be Patient!", vbOKCancel + vbQuestion
'Managers
SrcWbk.Sheets("MISC").Range("F3:h16").Copy: DestWbk.Sheets("MAIN").Range("k3:m16").PasteSpecial xlPasteValues
SrcWbk.Sheets("MISC").Range("F33:f39").Copy: DestWbk.Sheets("MAIN").Range("i3:i9").PasteSpecial xlPasteValues
I'm getting in to some pretty intricate spreadsheets now which require me to learn vba. I seem to be making a rather simple problem incredibly difficult for myself. All I want to do is deselect the cells I pasted and move it to k3. I appreciate your help ahead of time. To have people so willing to help is AMAZING!!
Here's just the top part of my code. I want to insert it at the bottom of this here...
Sub CopyAUG() Dim Fname As String
Dim SrcWbk As Workbook
Dim DestWbk As Workbook
Set DestWbk = ThisWorkbook
Fname = Application.GetOpenFilename(FileFilter:="Excel Files (*.xls*), *.xls*", Title:="Select a File")
If Fname = "False" Then Exit Sub
Set SrcWbk = Workbooks.Open(Fname)
Dim answer As Integer
answer = MsgBox("Did You Pick The Correct File?", vbQuestion + vbYesNo)
If answer = vbNo Then Exit Sub
MsgBox "Your Screen May Look Frozen While Importing." & vbNewLine & vbNewLine & "Just Be Patient!", vbOKCancel + vbQuestion
'Managers
SrcWbk.Sheets("MISC").Range("F3:h16").Copy: DestWbk.Sheets("MAIN").Range("k3:m16").PasteSpecial xlPasteValues
SrcWbk.Sheets("MISC").Range("F33:f39").Copy: DestWbk.Sheets("MAIN").Range("i3:i9").PasteSpecial xlPasteValues