+ Reply to Thread
Results 1 to 3 of 3

Syntax rules

  1. #1
    Registered User
    Join Date
    05-17-2020
    Location
    Beer sheeva , Israel
    MS-Off Ver
    10
    Posts
    17

    Syntax rules

    Hey

    I have a problem with where to write anything
    Basically, there are sheets, modules and class
    And it seems to me that I did not abide by the rules of the language

    Variables and Functions I have defined as public, I cannot access them from modules or sheets.

    I need to understand the rules, where to write the code in a way that I can access any variable or function without getting involved.

    I tried to search the web but my English is not high level
    What I need is just a brief general explanation of the subject

    Thanks in advance

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,678

    Re: Syntax rules

    It is very vague question.

    But if English is not your strong side you could look for some courses in your native language.

    These could be on-line courses, or "traditional" or may be books (but with a book it's not so easy to ask a teacher/author )

    Check your local universities if they don't run VBA programming courses for their students. During pandemic time many of them are given on-line and there is a chance you could join one of them or at least have the access to course materials.
    Best Regards,

    Kaper

  3. #3
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,461

    Re: Syntax rules

    As a quick guide.

    Code Module to store variables and functions that can be accessed from other modules/sheets/classes.

    Classes require the generation of object of that class before you can access the variables and function that are public within the class.
    Sheet objects are also classes, which Excel initiate for us. So again you would need to include the object in order to get to the objects.

    Code Module
    Please Login or Register  to view this content.
    Class module for Class1
    Please Login or Register  to view this content.
    Sheet1 code module
    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] how can I set up rules with If Then
    By nordicdust in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-10-2018, 08:34 PM
  2. Replies: 11
    Last Post: 07-20-2017, 11:26 AM
  3. Multiple IF, THEN rules
    By brooke711 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-11-2013, 11:33 AM
  4. conditional formatting rules for a cell on sheet 1 based on rules from sheet 2
    By jsard in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 1
    Last Post: 08-15-2013, 09:22 AM
  5. [SOLVED] Outlook 2010 - Creating Rules - Rules Constant
    By Jack7774 in forum Outlook Formatting & Functions
    Replies: 3
    Last Post: 03-18-2013, 03:48 PM
  6. help with IF rules
    By jon@karhu in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-08-2009, 11:56 AM
  7. The Rules
    By GirlSource in forum Excel General
    Replies: 1
    Last Post: 09-03-2006, 04:46 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1