smartpat19
Board Regular
- Joined
- Sep 3, 2014
- Messages
- 114
Hi everyone,
Here's my delima,
I have an add-in I'm deploying to my team, I'm placing it on our shared, network drive (I'll call this one "Production").
I want to do updates to this add-in in the future, without everyone having to re-install it.
I will have a developer add-in (located locally on my c: drive.).
I found this macro that when used will update the production file with my developer file. But it doesn't seem to be working.
This macro seems to be located in the add-in?
How can I run this macro from it's own worksheet and have it make the production add-in "read-Only"
Thanks! using 2013
Here's my delima,
I have an add-in I'm deploying to my team, I'm placing it on our shared, network drive (I'll call this one "Production").
I want to do updates to this add-in in the future, without everyone having to re-install it.
I will have a developer add-in (located locally on my c: drive.).
I found this macro that when used will update the production file with my developer file. But it doesn't seem to be working.
Code:
[COLOR=#3E3E3E]Sub DeployAddIn()[/COLOR]'Author : Ken Puls ([URL="http://www.excelguru.ca/"]www.excelguru.ca[/URL])
'Macro Purpose: To deploy finished/updated add-in to a network
' location as a read only file
Dim strAddinDevelopmentPath As String
Dim strAddinPublicPath As String
'Set development and public paths
strAddinDevelopmentPath = ThisWorkbook.Path & Application.PathSeparator
strAddinPublicPath = "J:\samart" & Application.PathSeparator
'Turn off alert regarding overwriting existing files
Application.DisplayAlerts = False
'Save the add-in
With ThisWorkbook
'Save to ensure work is okay in case of a crash
.Save
'Save read only copy to the network (remove read only property
'save the file and reapply the read only status)
On Error Resume Next
SetAttr strAddinPublicPath & .Name, vbNormal
On Error Goto 0
.SaveCopyAs Filename:=strAddinPublicPath & .Name
SetAttr strAddinPublicPath & .Name, vbReadOnly
End With
'Resume alerts
Application.DisplayAlerts = True [COLOR=#3E3E3E]End Sub[/COLOR]
This macro seems to be located in the add-in?
How can I run this macro from it's own worksheet and have it make the production add-in "read-Only"
Thanks! using 2013