Hi All,
I'm hoping I can get help with the below code, repeating it for a number of sheets.
I am downloading data from a sharepoint, and pasting it into the relevant named sheet, for example retrieve data from X and paste in X_Sheet.
I want to do the above multiple times with a loop, possible referencing a table?
_______________________________________________________________________________________________________
Private Sub CopySheetFromSPOINT()
Application.DisplayAlerts = False
Dim x As Workbook
Dim y As Workbook
Set x = Workbooks.Open("https://websitename.................xlsx")
Set y = ThisWorkbook
x.Sheets("tab_name").Cells.Copy
y.Sheets("tab_namex").Cells.PasteSpecial
y.Sheets("tab_namex").Cells.Copy
y.Sheets("tab_namex").Cells.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=True, Transpose:=False
Application.AskToUpdateLinks = False
Application.CutCopyMode = False
Application.AskToUpdateLinks = False
x.Close
Application.DisplayAlerts = True
End Sub
_________________________________________________________________________________
I am hoping that I can reference the download source as column 1 (i.e. the web address in the cell) and the column 2 is the paste source - and loop it
I'm hoping I can get help with the below code, repeating it for a number of sheets.
I am downloading data from a sharepoint, and pasting it into the relevant named sheet, for example retrieve data from X and paste in X_Sheet.
I want to do the above multiple times with a loop, possible referencing a table?
_______________________________________________________________________________________________________
Private Sub CopySheetFromSPOINT()
Application.DisplayAlerts = False
Dim x As Workbook
Dim y As Workbook
Set x = Workbooks.Open("https://websitename.................xlsx")
Set y = ThisWorkbook
x.Sheets("tab_name").Cells.Copy
y.Sheets("tab_namex").Cells.PasteSpecial
y.Sheets("tab_namex").Cells.Copy
y.Sheets("tab_namex").Cells.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=True, Transpose:=False
Application.AskToUpdateLinks = False
Application.CutCopyMode = False
Application.AskToUpdateLinks = False
x.Close
Application.DisplayAlerts = True
End Sub
_________________________________________________________________________________
I am hoping that I can reference the download source as column 1 (i.e. the web address in the cell) and the column 2 is the paste source - and loop it