Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Storing non-user data

I have just created a VBA input module (as per my previous posting when I
forgot to ask this question!) and want to maintain a count of the rows used so
that I can add new data to the next available row.
Where can I store this count so that it is carried between sessions, but not
visible/changeable on the worksheet.

TIA

Chris
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Storing non-user data

Chris
You could store the value in a hidden cell, or hidden worksheet (use very
hidden property set in VBA) to prevent users unhiding the sheet. This
method will mean the value is stored with the application. Use the workbook
open or form initialize events to get the value of the counter.

An alternative (basics shown below) is to store the value in the system
registry, however this is machine specific, so if you have multiple users
sharing this over a network this is not a good choice.

' use this template to store a value in the registry
SaveSetting APPNAME, "Defaults", CounterValue, Value
' use this template to read the registry
VBA.GetSetting (APPNAME, "Defaults", CounterValue, Value)

Cheers
N

"ChrisJForeman" wrote in message
...
I have just created a VBA input module (as per my previous posting when I
forgot to ask this question!) and want to maintain a count of the rows

used so
that I can add new data to the next available row.
Where can I store this count so that it is carried between sessions, but

not
visible/changeable on the worksheet.

TIA

Chris





----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! 100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Storing User Defined Functions in Office\Library folder for MAC's Carrie_Loos via OfficeKB.com Excel Discussion (Misc queries) 0 April 1st 09 05:51 PM
Storing data and its format jodleren Excel Discussion (Misc queries) 0 March 30th 07 01:26 PM
storing real time data Meng Excel Discussion (Misc queries) 1 September 15th 06 04:58 AM
storing data JK57 Excel Worksheet Functions 3 May 1st 06 12:16 AM
Storing data Bob Mckenzie New Users to Excel 3 July 30th 05 07:33 PM


All times are GMT +1. The time now is 11:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"