VBA learner ITG
Active Member
- Joined
- Apr 18, 2017
- Messages
- 272
- Office Version
- 365
- Platform
- Windows
- MacOS
Thank you for reading my post.
I was wondering if anyone could advise me or point me in the right direction on the below issue I am having.
I have the below VBA code to create a new project Tab within the project document which is saved on my Mac desktop. However I am looking for a piece of VBA code that will allow me to save a copy of the new tab thats created to a Sharepoint site with the same name thats created as part of the below VBA code.
Also is there a way to either link the saved/newly created tab to the saved doc on the sharepoint site to update when new data is inputted into the tab or when it saved it will refresh the data?
IS it at all possible as i'm using Office 365 for Mac.
Sub Copy_paste_tab()
Range("D5").Select
ExecuteExcel4Macro _
"FORMULA.REPLACE("" "",""_"",2,1,TRUE,FALSE,,FALSE,FALSE,FALSE,FALSE)"
Cells.Find(What:=" ", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False) _
.Activate
Range("A1").Select
Dim ws As Worksheet
Set wh = Worksheets(ActiveSheet.Name)
ActiveSheet.Copy After:=Worksheets(Sheets.Count)
If wh.Range("D5").Value <> "" Then
ActiveSheet.Name = wh.Range("D5").Value
End If
wh.Activate
End Sub
I was wondering if anyone could advise me or point me in the right direction on the below issue I am having.
I have the below VBA code to create a new project Tab within the project document which is saved on my Mac desktop. However I am looking for a piece of VBA code that will allow me to save a copy of the new tab thats created to a Sharepoint site with the same name thats created as part of the below VBA code.
Also is there a way to either link the saved/newly created tab to the saved doc on the sharepoint site to update when new data is inputted into the tab or when it saved it will refresh the data?
IS it at all possible as i'm using Office 365 for Mac.
Sub Copy_paste_tab()
Range("D5").Select
ExecuteExcel4Macro _
"FORMULA.REPLACE("" "",""_"",2,1,TRUE,FALSE,,FALSE,FALSE,FALSE,FALSE)"
Cells.Find(What:=" ", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False) _
.Activate
Range("A1").Select
Dim ws As Worksheet
Set wh = Worksheets(ActiveSheet.Name)
ActiveSheet.Copy After:=Worksheets(Sheets.Count)
If wh.Range("D5").Value <> "" Then
ActiveSheet.Name = wh.Range("D5").Value
End If
wh.Activate
End Sub