vbaexceladd-inxla

VBA : Updating a Sheet in a XLA Add-In


I'm currently updating a Worksheet in the ActiveWorkbook on the fly from a network file.

I'd like to move this Ws from the ActiveWorkbook into an XLA Add-In.

If I do so, will I still be able to update it (ie update the data then save the XLA Add-In) if the XLA Add-In is password-protected ? Would something like this work ?

Private Sub updateMyXLASheet(ByVal MyDataArray as Variant)

ThisWorkbook.Sheet("myXLADataSheet").Range("myDataArrayGoesHere").Value = MyDataArray
Application.DislayAlertes = False
ThisWorkbook.Save
Application.DislayAlertes = True

End Sub

(ThisWorkbook being the XLA Add-In workbook)


Solution

  • It seems like Excel have no problem updating then saving a Sheet on a password protected XLA Add-In.