Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default 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!!!!



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I fill a cell in a user form from a selection on same form? Terry Tipsy Excel Discussion (Misc queries) 4 June 11th 07 02:59 PM
File protect via extern USB crypto modul? frenic[_4_] Excel Programming 3 November 9th 05 12:56 AM
How to: User Form to assign a user defined range to a macro variab TrevTrav Excel Programming 1 March 22nd 05 07:57 PM
I am looking to see if anybody has an equivalant user form to Outlooks CONTACT form BruceJ[_2_] Excel Programming 2 October 15th 03 05:28 PM


All times are GMT +1. The time now is 09:10 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"