Results 1 to 3 of 3
  1. #1
    Rawb is offline Expert
    Windows XP Access 2000
    Join Date
    Dec 2009
    Location
    Somewhere
    Posts
    875

    Using Protected Functions in a Class Module

    Can you use the Protected attribute when programming in VBA? Every search I can think of returns a result for Visual Basic, not VBA. And, when I try using it, I get an error.



    This is contained in a Class Module defining a custom Object:
    Code:
    Protected Sub Set_LastUpdated(Value As Date)
      tLastUpdated = Value
    End Sub
    The Word "Sub" is hilighted and I get the compile error "Expected: expression"

    What I'm trying to do is spelled out in more detail in this thread.

  2. #2
    stmoong is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2011
    Location
    Singapore
    Posts
    108
    There is no Protected keyword in VBA.

  3. #3
    Rawb is offline Expert
    Windows XP Access 2000
    Join Date
    Dec 2009
    Location
    Somewhere
    Posts
    875
    Well phooey :/

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Initialization Module/Class
    By swalsh84 in forum Modules
    Replies: 1
    Last Post: 12-13-2014, 12:25 PM
  2. class module vs regular module
    By Madmax in forum Modules
    Replies: 1
    Last Post: 05-01-2012, 03:44 PM
  3. Open a password protected MDB/MDW
    By abcc14 in forum Security
    Replies: 8
    Last Post: 11-02-2011, 07:41 AM
  4. Replies: 4
    Last Post: 09-14-2011, 12:33 AM
  5. Replies: 4
    Last Post: 05-16-2011, 04:58 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums