Jump to content
Sign in to follow this  

Need someone to create GUI that will calculate from spreadsheet

Recommended Posts


I have a spreadsheet I use for my business that calculates my cost to build a given project. The spreadsheet has many calculations and I would like to be able to have a GUI for my salespeople to just enter information about the project and it fills those cells that do the calculations.

Any ideas? Thank you!

Share this post

Link to post
Share on other sites

I'm sure that there are better ways, but here's an example:

#include <WindowsConstants.au3>;ws_vscroll
#include <GUIConstantsEx.au3>;gui_event_close
local $fieldmax= 10, $aField[$fieldmax][2];[0]data, [1]label cause I'm ass backwards
local $labellen= 100
local $fieldlen= 200
local $textheight= 20
enum $eFirstname, $eLastname, $eMiddlename, $eAddress, $ePhone;count with me: 0, 1, 2, 3, 4.  0= eFirstname

$aField[$eFirstname][1]= "First Name"; <v - - << Define labels for user
$aField[$eLastname][1]= "Last Name"
$aField[$eMiddlename][1]= "Middle Name"
$aField[$eAddress][1]= "Street Address"
$aField[$ePhone][1]= "Phone Number"

$hgui= guicreate("Data for you", 600, 480);create gui dialog window
for $i= 0 to $fieldmax-1
    $aField[$i][1]= guictrlcreatelabel($aField[$i][1], 10, 10+$i*$textheight+5, $labellen, $textheight);make labels
    $aField[$i][0]= guictrlcreateedit("", 10+$labellen+15, 10+$i*$textheight, $fieldlen, $textheight, $WS_VSCROLL);make edit fields for user input
$filemenu= guictrlcreatemenu("&File");create File menu
$fileexit= guictrlcreatemenuitem("&Exit", $filemenu);add exit command to File menu
guisetstate();show the gui window dialog

    $msg= guigetmsg();assign messages from dialog window to msg
    switch $msg;react to dialog messages
        case $fileexit;command: menubar file, exit
    sleep(10);don't over heat idk
until $msg= $gui_event_close;until the top right close 'x' button clicked
Edited by Xandy

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this