Welcome to Dream.In.Code
Become a VB Expert!

Join 149,472 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 1,924 people online right now. Registration is fast and FREE... Join Now!




Creating long Sub routines

 
Reply to this topicStart new topic

Creating long Sub routines, Can I combine multiple subs?

djessellis
25 Jan, 2008 - 06:21 AM
Post #1

New D.I.C Head
*

Joined: 18 Jan, 2008
Posts: 13


My Contributions
Hello Guys -

I have been putting together a number of discrete Macro sub-routines to run in BusinessObjects 6.5. I have no problem in running them independantly, but there are quite a number of them. Due to the constraints of the software platform (unlike MSFT Office prgms you cant easily create buttons for the Macros) I want to combine the Sub-routines into groups. Basically, I am struggling to find the correct way to have a numebr of processes contained within one named Sub.

The seperate sub-routines are as follows (and each works independantly:)

CODE
Sub Process_Level_1()

Dim dp As DataProvider

Set dp = ActiveDocument.DataProviders.Item(1)

dp.Refresh
    'Refresh Level 1
End Sub


CODE
Sub Process_Level_1()

Dim dp As DataProvider

Set dp = ActiveDocument.DataProviders.Item(4)

dp.Refresh
    'Refresh Level 1
End Sub


CODE
Sub Process_Level_1()

ActiveReport.ExportAsText ("C:\Arrears Level 1 Output")
    'Export Text file
    
End Sub


I have given them all the same Sub-Routine name as I want them to be combines, but obviously this isn't going to get past the de-bugging stage. Can anyone advise me on how to combine all three routines into the same Sub?

Thanks...

Jesse
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/7/09 02:36PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month