Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Starting Out
Hello I have been dabbling with excel spreadsheets for a while and now need to learn how to use VB (Ineed it to help me reset the values of my variable cells). Could you please guide me in the right direction, as to where I need to go to learn how to write functions and formulas in VB. Thank you Trilogy -- trilogy ------------------------------------------------------------------------ trilogy's Profile: http://www.excelforum.com/member.php...o&userid=36833 View this thread: http://www.excelforum.com/showthread...hreadid=566500 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Starting Out
There are many good books available in any good bookstore or on Amazon.
If you need something simple to start with you can simply create a macro, assign a keycode to it (like Control-K) and put the following code in it: Sheets("SheetName").Range("a1").value = "InitalValue1" Sheets("SheetName").Range("b1").value = "InitalValue2" etc. Alternatively, you can create some code and a button on a UserForm as follows: 1. create a userform with a button on it. The Button Caption (label) can be "Reset Values". 2. In the Workbook_Load event you can include the line UserForm.Show 3. In the button_ Click event, You can simply write the following: Dim ExcelApp as Excel.Application Dim MySheet as Excel.Sheet ' set ExcelApp to the existing application Set ExcelApp = GetObject (,"Excel.Application") Set MySheet = ExcelApp.Sheets("whateeveryoursheetNameis") MySheet.Range("A1").value = initalvalue1 MySheet.Range("B1").value = initalvalue2 .. .. .. Hope this helps. Arif "trilogy" wrote: Hello I have been dabbling with excel spreadsheets for a while and now need to learn how to use VB (Ineed it to help me reset the values of my variable cells). Could you please guide me in the right direction, as to where I need to go to learn how to write functions and formulas in VB. Thank you Trilogy -- trilogy ------------------------------------------------------------------------ trilogy's Profile: http://www.excelforum.com/member.php...o&userid=36833 View this thread: http://www.excelforum.com/showthread...hreadid=566500 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Starting Out
Thank you Arif Your help has been invaluable in setting me on the right path. Thank you Trilogy -- trilogy ------------------------------------------------------------------------ trilogy's Profile: http://www.excelforum.com/member.php...o&userid=36833 View this thread: http://www.excelforum.com/showthread...hreadid=566500 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Starting with a zero? | Excel Discussion (Misc queries) | |||
Starting add-in using vba | Excel Programming | |||
Starting add-in using vba | Excel Programming | |||
Starting over | Excel Programming | |||
Starting a userform upon starting the file | Excel Programming |