Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default excel process problem

Dear All,

I write a vba program to process a task and this program is sitting in
a workbook for each of the staff about 20 in the same department. Each
of them cannot see each other's workbook due to the nature of their
work but the process step is the same for all.
1) May I know how should I do to rollout the vba program to each of
their workbook? Do I need to do the import in the VBE?

2) they are using a workbook for each of the project. When they do the
subsequently project they need a new workbook to do the same process
again. If that is so may I know if I need to do the import all the
time when they use new workbook for new project? I cannot let them do
as they will access to the vba source.

3) there is a process where they need to transfer data from worksheets
to 1 particular worksheet to derive the subtotal. I created a toolbar
commandbutton to process. The problem is they need to go to the
specific or active sheet to process. If having 60 sheets then they
need to process 60 times. I do not want to put the button on sheets as
will create a lot of procedures.
Any other way to process by providing sheet number in inputbox and
process once for all the sheets(transfer data from all the source
sheets to a single destination sheet) What is the vba statement for
this?

Again, thanks for the assistance so far.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 212
Default excel process problem

1) For the existing project since the excel files are already created on
each machine,
you can do import on each file.

2) For the next project, you can create a template having your VBE code in
it and circulate to
every one. For the next projects, they should use this template .

3) Instead of adding command button in a sheet, add a new button on the tool
bar,
and assing the macro to it. So the button will be always available to the
use on the tool bar.

Transfering data from all worksheets:

Below code gets a valid sheet no. from the user and transfers contents of
Range("A1") from every sheet (except the sheet for sheet no. entered ) in
to
the sheet for sheet no. entered, in to Column F.

Sub Test()
Dim getNum As String, mySheetNum As Integer
Dim myRange As Range, nCount As Integer
Dim totSheetNum As Integer

getSheetNum:
getNum = InputBox("Please enter the desitantion sheet number", _
"Sheet Numbar Required:")
If Len(getNum) = 0 Then Exit Sub
'i.e. if no data entered or user presses cancel, do noting.
If Not IsNumeric(getNum) Then
MsgBox "Please enter an Integer"
GoTo getSheetNum:
End If
'i.e. check if data entered is numeric or not if no ask again
If InStr(1, getNum, ".", vbTextCompare) 0 Then
MsgBox "Please enter an Integer"
GoTo getSheetNum:
End If
'i.e check if the number entered has a "." in it if yes ask
'for an integer again

mySheetNum = Int(getNum)
totSheetNum = ThisWorkbook.Sheets.Count
If mySheetNum totSheetNum Then
MsgBox "The sheet number you entered is not valid because" & _
" there are only " & totSheetNum & " sheets!" & Chr(13) & _
"Please enter a valid sheet number."
GoTo getSheetNum
End If

nCount = 1
For Each s In ThisWorkbook.Sheets
If Not s.Index = mySheetNum Then
Sheets(mySheetNum).Range("F" & nCount) = s.Range("A1")
nCount = nCount + 1
End If
Next

End Sub

"tango" wrote in message
om...
Dear All,

I write a vba program to process a task and this program is sitting in
a workbook for each of the staff about 20 in the same department. Each
of them cannot see each other's workbook due to the nature of their
work but the process step is the same for all.
1) May I know how should I do to rollout the vba program to each of
their workbook? Do I need to do the import in the VBE?

2) they are using a workbook for each of the project. When they do the
subsequently project they need a new workbook to do the same process
again. If that is so may I know if I need to do the import all the
time when they use new workbook for new project? I cannot let them do
as they will access to the vba source.

3) there is a process where they need to transfer data from worksheets
to 1 particular worksheet to derive the subtotal. I created a toolbar
commandbutton to process. The problem is they need to go to the
specific or active sheet to process. If having 60 sheets then they
need to process 60 times. I do not want to put the button on sheets as
will create a lot of procedures.
Any other way to process by providing sheet number in inputbox and
process once for all the sheets(transfer data from all the source
sheets to a single destination sheet) What is the vba statement for
this?

Again, thanks for the assistance so far.



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
Using excel to process QIF file John Keith Excel Discussion (Misc queries) 0 November 14th 09 07:15 AM
How do I make a process map in Excel? The Hard Worker Charts and Charting in Excel 2 May 24th 05 05:38 PM
Problem with process Excel siedem Excel Programming 3 December 31st 03 04:38 PM
How to Quit an Excel process? Joe Brown Excel Programming 0 October 1st 03 06:06 AM
to kill a excel process han keat Excel Programming 1 July 18th 03 07:32 AM


All times are GMT +1. The time now is 07:08 AM.

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"