![]() |
User form/Modul
I am quite new tom Visual Basic. I am making a program that is supposed to
work with excel. The main idea is that there are information in a spreadsheet and the can by pressing a button on the spreadsheet process the info. This is my first VB-program so I started to write the code in the by editing a macro. Now it seems like it is all wrong. My code seems to be connected to a User Form and the button is not displayed until the program is chosen. What I want is for the button to be visible when opening the workbook. Also I am not interested in using any User Form, I just want the pressing of the button to result in a series of actions. Does anyone know where I have done it wrong? I am clueless when it comes to VB so any help is much appreciated. My code is : Private Sub dagensDatumKnapp_Click() findAndRemoveBlanks findQC findMV findDate End Sub As you can see the Sub calls for some other subs. However I want to have a main (like in Java) that controls the sequence of the program but I just do not get it. Please please help me!!!! |
User form/Modul
This is an very big question to answer so I am just goint to summarize
what you want to do. You don't need a user form at all. From the sound of it, you should put code you wish to execute when the workbook is opened in the Workbook_Open event (in the ThisWorkbook object). I would create a command bar and a command button (look these up in the object explorer for help) in this open event. Set the "onaction" property of the command button to call your routine: Private Sub dagensDatumKnapp_Click() findAndRemoveBlanks findQC findMV findDate End Sub Hope this helps point you in the right direction. -K |
All times are GMT +1. The time now is 03:25 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com