rlcurlee67
New Member
- Joined
- Jun 1, 2022
- Messages
- 11
- Office Version
- 2013
- Platform
- Windows
What I want my macro to do is where ever my cursor is on the sheet is my active cell.
Then goto the X:\...... path
and copy what is in cell B46
Then go back to my active sheet and active cell and paste.
It is not doing that.
Can you assist.
[Sub Macro10()
'
' Macro10 Macro
'
'
Dim myFile As String
Dim YourFolderPath As Variant
Sheets("2022 Oil Production").Select
YourFolderPath = "X:\UTCS\Region\USA\Assets\GOM_DEV\Julia\SubSrfc\Rsvr_Mgmt-Surv\Surv-Data\Prod\St. Malo Morning Report - by Prod Date\2022"
ChDir YourFolderPath
ChDrive "X"
myFile = Application.GetOpenFilename
Range("B46").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Project 3. Oil Production copy (003).xlsx").Activate
Sheets("2022 Oil Production").Select
ActiveCell.Paste
End Sub]
Then goto the X:\...... path
and copy what is in cell B46
Then go back to my active sheet and active cell and paste.
It is not doing that.
Can you assist.
[Sub Macro10()
'
' Macro10 Macro
'
'
Dim myFile As String
Dim YourFolderPath As Variant
Sheets("2022 Oil Production").Select
YourFolderPath = "X:\UTCS\Region\USA\Assets\GOM_DEV\Julia\SubSrfc\Rsvr_Mgmt-Surv\Surv-Data\Prod\St. Malo Morning Report - by Prod Date\2022"
ChDir YourFolderPath
ChDrive "X"
myFile = Application.GetOpenFilename
Range("B46").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Project 3. Oil Production copy (003).xlsx").Activate
Sheets("2022 Oil Production").Select
ActiveCell.Paste
End Sub]