vkexcelvba
New Member
- Joined
- Sep 19, 2018
- Messages
- 1
Hi,
I have been trying to put a code which should:
Copy data from sheet (e.g. copy column A till last cell with data) to master sheet (in column A past the copied data in next available blank cell).
My source sheets keep changing so I have got workaround where i will rename the file and browse using below code:
Sub ImportDatafromSource()
Application.ScreenUpdating = False
Dim Master As Workbook
Dim Source As Workbook
Dim wbpath As String
' Master is active workbook where data will be copied from Source file
Set Master = ActiveWorkbook
wbpath = Application.GetOpenFilename
If wbpath = "False" Then
MsgBox ("No workbook selected, please select Source datafile"), vbInformation
Exit Sub
End If
'set Source as open workbook from where data will be copied
Set Source = Workbooks.Open(wbpath)
I have tried various mathods to find last empty cell but its not working as expected, please help.
I have been trying to put a code which should:
Copy data from sheet (e.g. copy column A till last cell with data) to master sheet (in column A past the copied data in next available blank cell).
My source sheets keep changing so I have got workaround where i will rename the file and browse using below code:
Sub ImportDatafromSource()
Application.ScreenUpdating = False
Dim Master As Workbook
Dim Source As Workbook
Dim wbpath As String
' Master is active workbook where data will be copied from Source file
Set Master = ActiveWorkbook
wbpath = Application.GetOpenFilename
If wbpath = "False" Then
MsgBox ("No workbook selected, please select Source datafile"), vbInformation
Exit Sub
End If
'set Source as open workbook from where data will be copied
Set Source = Workbooks.Open(wbpath)
I have tried various mathods to find last empty cell but its not working as expected, please help.