开发者

Excel 2003 - assign a custom/user-defined property to an individual cell?

Does the Excel cell object expose "custom" properties? I'd like a cell to have a "tag" which will be used in a VBA function, however, I don't want this "tag" to be visible to a user.

For example;

Cell A1 has the custom property/tag "Personal||Finance" attributed to it. This property should (possibly) only be accessible via VBA. I can then use this property in 开发者_StackOverflowa procedure in order to know where in a database the value of the cell should be saved. I will set the property using a user-form.

I hope this makes sense. In Access, I use the Tag property for a control to do things via VBA. The principle would be broadly the same, only instead of a control, I need to tag a cell.

Thanks, Phil.


Names would be a nice simple solution. They are accessible via the user.

However, if you really want to hide it from the end user, you could create a very hidden worksheet. Then create a custom class to manage the creation,deletion of the 'tag' elements and cell information to build a nice lookup table for your database mapping. The user could not access the sheet unless by VBA. This adds more complexity, but is entirely hidden from the user, and slightly more flexible than the names approach.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜