Results 1 to 5 of 5

VBA Constants and Variables

Threaded View

  1. #1
    Registered User
    Join Date
    11-05-2010
    Location
    Aberdeen
    MS-Off Ver
    Excel 2003
    Posts
    1

    VBA Constants and Variables

    Hello,

    I am fairly experenced excel user but I am relatively new to VBA (only started using it a couple of weeks ago).

    I am currently trying to build a engineering spreadsheet for the design of foundations. this requires alot of functions and calculations.

    What i am looking to do is use the spreadsheet as an input and output area only and carry out all the calculations in VBA so i want to refer to the spreadsheet as little as possible in the code.

    My Idea to do this was to create a module with all the input parameters for the calculations that are required which would pick the values of the parameters from the values entered into the spreadsheet cells, these parameters could then be used throughout the programme code without having to refer back to the spreadsheet again.

    One way I this this was expressing each parameter as a funtion e.g
    Function dia()
    dia=Range("dia").value
    End function
    This works but seems to stop the spreadsheet updating automatically.

    Ive tried using varibale and constants but theu dont allow you to refer to the spreadsheet.

    I hope someone can help, this has been annoying me for the last couple of days

    Thanks
    Ian
    Last edited by royUK; 11-05-2010 at 05:16 AM. Reason: add code tags

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