How do I allow users to save changes to worksheet data store

Vlip

New Member
Joined
Mar 10, 2002
Messages
49
Hi,

I have an AddIn that when run, displays a dialog box. This dialog box has a listbox with entries filled in from data stored in a worksheet of the AddIn. I would like for the user to be able to make modifications to this list and so through a multipage form, I have provided a means for the user to do this. It appears to work fine and the new item is shown on the list. But, if the user exists Excel and then restarts or removes and then adds the AddIn, the changes are lost. Is there any way to make those changes permanent for that user? I use the Save method of the workbook with the .xla extension.

Thanks for your help,
Vlip
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Couldn't you just capture the username via an API call, save his/her info to a text file, and then recall when needed????

I have the API code if you need it.

Will have to look
This message was edited by TsTom on 2002-03-22 20:39
 
Upvote 0
Following is API call for username:

Option Explicit
Private Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" _
(ByVal lpBuffer As String, _
nSize As Long) As Long

Sub Get_User_Name()

Dim lpBuff As String * 25
Dim ret As Long, UserName As String
ret = GetUserName(lpBuff, 25)
UserName = Left(lpBuff, InStr(lpBuff, Chr(0)) - 1)
MsgBox UserName

End Sub
 
Upvote 0
Just have all entries stored on a sheet in the Add-in Workbook and use the "Rowsource" Property to return the list to the user.
 
Upvote 0
Not sure what the problem is, but I feel is that Excel isn't saving the AddIn when closed.

In the code put a line like

ThisWorkbook.Save

after the user has made the modifications he needs to do.
 
Upvote 0
I do have a line with ThisWorkbook.Save but it isn't saving. That's what the problem is. For some reason, it does not save.

Vlip
 
Upvote 0

Forum statistics

Threads
1,213,546
Messages
6,114,256
Members
448,557
Latest member
richa mishra

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top