+ Reply to Thread
Results 1 to 5 of 5

IF Statements and modules

  1. #1
    Registered User
    Join Date
    01-01-2010
    Location
    london, england
    MS-Off Ver
    Excel 2007
    Posts
    26

    IF Statements and modules

    Hi,

    Hoping someone can help me – I am new to VBA within Excel and hoping to create a script to include IF statements that reference modules I have written (effectively macros).

    I want an IF statement to be something similar as follows:

    IF cell A2 in worksheet with name “Sheet1” is equal to 1, activate module named “test1”. If not, do nothing.

    Hope this makes sense and hope someone can help me create this easily.

    Many thanks,

    Nick

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643
    Nick

    You can't really activate modules.

    Are you trying to run code that is within subs in the modules?
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    01-01-2010
    Location
    london, england
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: IF Statements and modules

    Thanks for your reply. I am basically looking to do the following...

    In worksheet 1, if cell A2 is equal to one, to turn off calculating cells off automaticlaly in worksheet 2. Then if cell A2 in worksheet 1 is equal to amnything else, not to do anything.

    I think I am trying to run code that is written within the modules. As you can tell I am new!

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: IF Statements and modules

    Do you have code?

  5. #5
    Registered User
    Join Date
    01-01-2010
    Location
    london, england
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: IF Statements and modules

    Quote Originally Posted by Norie View Post
    Do you have code?
    Sadly not. This is what I need help with and to create the IF statement

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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