Question:
MS Excel (Add in Code ?) Help?
Deve
2006-08-27 22:22:46 UTC
I am writing a Excel add in.
This Excel add-in will store the option of the users.
Add -in will load the setting from last saved options.

Option would be like - storing cell reference of current workseet (user's choice) and retrieving it with reference to opened Worksheet . that means everytime a new work-sheet is opened add will refer to that particular cell of current worksheet
Now I am stuck how can I do it in VBA .
Help needed
Three answers:
anonymous
2006-08-30 01:50:35 UTC
You can use the Sequential file access to store settings per user.

Means you can use the folder..

C: - Documents and settings - USERNAME - Application data - Microsoft - Excel

to store in the file that you will create in VBA to save settings for that user.

USE

Open [filename] for output as [#1]

to open the file to write in (Writing method)

AND

Open [filename] for intput as [#1]

to open that file in read method

AND

Close [#1]

to close that opened file

Write [#1],[variable]

to save the current value [variable] in the first line

AND

Write [#1],[valriable]

to save the second line and so on

AND USE

Line input [#1],[variable name]

to read the line after opening for input into the variable [variable name]

This is the core of VB, I hope you can use it easily



contact me through Yahoo! answers for more info



XLMan
brsanthu
2006-08-28 05:43:30 UTC
Try Application.ActiveWorkbook.ActiveSheet to get the current worksheet and refer to any cell in that.

b
anand
2006-08-28 11:23:41 UTC
this may help u :

http://www.mrexcel.com/vbaddin.shtml


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...