$$Excel-Macros$$ time management VBA code for txt file

2010-04-08 Thread OSAVentures Calamba
*Dear VBA Experts,*

I'm wondering if there is a code possible to summarize the contents of a
text file as partly shown below.
I received this file at a certain period. Thousands rows of records. Each
data contains code and date  time stamps. The first line is logged in and
the next logged out, then next row logged in data again and so forth.

I wanted to extract data from a txt file, and summarized the total hours (
logged out-logged in) for all the days for each code.
I hope I explain it well.  Doing this manually in excel is a very tedious
process.

M09097461 =code
2010-03-23-0649- =time
A1= data not important


M09097461 201003230649A1 -  logged in
M09097461 201003232008Z006825001-  logged out
M09097461 201003240641A1-logged in
M09097461 201003242008Z007280001-logged out...
M09097461 201003250653A1
M09097461 201003252000Z004095001
M09097461 201003260645A1
M09097461 201003260645A1
M09097461 201003262011Z005460001
M09097461 201003262011Z005460001
M09097461 201003270645A1
M09097461 201003272015Z007735001
M09097461 201003280646A1
M09097461 201003282005Z007735001
M09097461 201003290657A1
M09097461 201003292007Z00911
M09097461 201003300701A1
M09097461 201003302015Z005005001
M09097461 201003310714A1
M09097461 201003311215Z014105001
M09067338 201003230716A1
M09067338 201003231740Z1
M09067338 201003240739A1
M09067338 201003241953Z1
M09067338 201003250659A1
M09067338 201003251938Z1
M09067338 201003260715A1
M09067338 201003261710Z1
M09067338 201003280715A1
M09067338 201003281715Z1
M09067338 201003290713A1
M09067338 201003291941Z1
M09067338 201003300715A1
M09067338 201003301943Z1
M09067338 201003310715A1
M09067338 201003311226Z015015001

thanks
Grace

-- 
--
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our Facebook Group @ http://www.facebook.com/group.php?gid=287779555678
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com


HELP US GROW !!

We reach over 6,800 subscribers worldwide and receive many nice notes about the 
learning and support from the group.Let friends and co-workers know they can 
subscribe to group at http://groups.google.com/group/excel-macros/subscribe

To unsubscribe, reply using remove me as the subject.


Re: $$Excel-Macros$$ 12 secret shortcuts of Excel

2010-04-04 Thread OSAVentures Calamba
Great Kudos and blessing to Ayush Jain.  You will have a great legacy for
helping others and sharing your candlelight.  Indeed, sharing your light
with others do not diminish its brightness but multiply it.

On Fri, Apr 2, 2010 at 11:26 PM, ayush jain jainayus...@gmail.com wrote:

 Dear Members,

 Thanks for all your contribution to the group.

 The group has successfully completed three years. On this occasion, I would
 like to launch an eBook on excel shortcuts written by me recently.
 * Through this eBook I want to show some powerful shortcuts so you become
 more productive and efficient at work.*

 I hope this eBook will help you. Please let me know your feedback.

 Please share this *free eBook* with your friends and colleagues and help
 spreading the word. Thanks.

 Keep Posting!!

 Best regards,
 Ayush Jain
 Group Manager
 http://discussexcel.com/

 P.S. The book is also available in files section of group.

 --

 --
 Some important links for excel users:
 1. Follow us on TWITTER for tips tricks and links :
 http://twitter.com/exceldailytip
 2. Join our Facebook Group @
 http://www.facebook.com/group.php?gid=287779555678
 3. Excel tutorials at http://www.excel-macros.blogspot.com
 4. Learn VBA Macros at http://www.quickvba.blogspot.com
 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com

 To post to this group, send email to excel-macros@googlegroups.com

 
 HELP US GROW !!

 We reach over 6,800 subscribers worldwide and receive many nice notes about
 the learning and support from the group.Let friends and co-workers know they
 can subscribe to group at
 http://groups.google.com/group/excel-macros/subscribe


-- 
--
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our Facebook Group @ http://www.facebook.com/group.php?gid=287779555678
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com


HELP US GROW !!

We reach over 6,800 subscribers worldwide and receive many nice notes about the 
learning and support from the group.Let friends and co-workers know they can 
subscribe to group at http://groups.google.com/group/excel-macros/subscribe

To unsubscribe, reply using remove me as the subject.


$$Excel-Macros$$ autofill vba

2010-03-19 Thread OSAVentures Calamba
Hi All, I'm trying to fill C6 with value of 1 then selecting that and
filling the cell below it with series until the last row of B, my code is
not working.  whats wrong? thanks

Sub Fillnumber()
ActiveSheet.Unprotect
curr_row = Range(C6).Row
curr_col = Range(C6).Column
last_row = Range(B65336).End(xlUp).Row
'last_col = Range(anchor_cell).Offset(0, 1).End(xlToRight).Column
Range(C6).Select
On Error Resume Next
Range(C6).FormulaR1C1 = 1
Range(C6).Select
Selection.AutoFill Destination:=Range(C6:C  last_row),
Type:=xlFillSeries
Range(C6).Select
ActiveSheet.Protect
End Sub

-- 
--
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our Facebook Group @ http://www.facebook.com/group.php?gid=287779555678
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com


HELP US GROW !!

We reach over 6,800 subscribers worldwide and receive many nice notes about the 
learning and support from the group.Let friends and co-workers know they can 
subscribe to group at http://groups.google.com/group/excel-macros/subscribe

To unsubscribe from this group, send email to 
excel-macros+unsubscribegooglegroups.com or reply to this email with the words 
REMOVE ME as the subject.


$$Excel-Macros$$ selecting a range and printing it with column title and print headings - vba

2010-03-18 Thread OSAVentures Calamba
dear expert,

im new in vba but my work is truly repetitive.  I want to select a range and
print preview it.
example my row heading is row 1:5, and my column heading is col A:D, I want
to select the range starting row 6 until last column with data and last row.


Any VBA please. Microsoft helps provides as follows.

lastCol = ActiveSheet.Range(a1).End(xlToRight).Column
lastRow = ActiveSheet.Cells(65536, lastCol).End(xlUp).Row
ActiveSheet.Range(a1:  _
   ActiveSheet.Cells(lastRow, lastCol).Address).Select

how to set the selected range to variable range to be use as print range.

Thanks a lot.

-- 
--
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our Facebook Group @ http://www.facebook.com/group.php?gid=287779555678
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com


HELP US GROW !!

We reach over 6,800 subscribers worldwide and receive many nice notes about the 
learning and support from the group.Let friends and co-workers know they can 
subscribe to group at http://groups.google.com/group/excel-macros/subscribe

To unsubscribe from this group, send email to 
excel-macros+unsubscribegooglegroups.com or reply to this email with the words 
REMOVE ME as the subject.


$$Excel-Macros$$ VBA - dynamic range A copy formula in range B in vba

2010-03-18 Thread OSAVentures Calamba
dear all,

i have a dynamic column A which i used as a lookup value formula in column
B, but since the column A is dynamic, how to create a vba code to copy the
formula in say B1, down to the last row equal to column A.

im using excel2003 . thanks a lot.

-- 
--
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our Facebook Group @ http://www.facebook.com/group.php?gid=287779555678
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com


HELP US GROW !!

We reach over 6,800 subscribers worldwide and receive many nice notes about the 
learning and support from the group.Let friends and co-workers know they can 
subscribe to group at http://groups.google.com/group/excel-macros/subscribe

To unsubscribe from this group, send email to 
excel-macros+unsubscribegooglegroups.com or reply to this email with the words 
REMOVE ME as the subject.


Re: $$Excel-Macros$$ index match lookup

2010-03-16 Thread OSAVentures Calamba
Thanks to all the great suggestions. There are really a lot of ways to do
things in excel.


On Mon, Mar 15, 2010 at 4:02 PM, OSAVentures Calamba osav...@gmail.comwrote:

 dear helpful experts,

 how to find the corresponding value in a column matching 2 criterias.

 please help with this look up formula to find the value as per attached
 worksheet.  many many thanks to all.


 thanks
 davegla

  --

 --
 Some important links for excel users:
 1. Follow us on TWITTER for tips tricks and links :
 http://twitter.com/exceldailytip
 2. Join our Facebook Group @
 http://www.facebook.com/group.php?gid=287779555678
 3. Excel tutorials at http://www.excel-macros.blogspot.com
 4. Learn VBA Macros at http://www.quickvba.blogspot.com
 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com

 To post to this group, send email to excel-macros@googlegroups.com

 
 HELP US GROW !!

 We reach over 6,800 subscribers worldwide and receive many nice notes about
 the learning and support from the group.Let friends and co-workers know they
 can subscribe to group at
 http://groups.google.com/group/excel-macros/subscribe


-- 
--
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our Facebook Group @ http://www.facebook.com/group.php?gid=287779555678
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com


HELP US GROW !!

We reach over 6,800 subscribers worldwide and receive many nice notes about the 
learning and support from the group.Let friends and co-workers know they can 
subscribe to group at http://groups.google.com/group/excel-macros/subscribe


$$Excel-Macros$$ VBA extracting unique records summing up data and put total ( .font.bold) next empty row

2010-03-16 Thread OSAVentures Calamba
*Dear VBA experts,*

I have a database( excel 2003 spreadsheet) with various columns.  I have
dynamically named each column for me to execute a a sum, lookup, or count
later with less confusion.

I want to create a code to insert a temporary report sheet to populate say
column A with unique records and then using the extracted unique records as
criteria ( column A ) to lookup values in the database appearing in column b
( or next empty column) the total at the next empty row  with bold font.
Afterwards, I want to print preview the temporary worksheet. I want to
delete the temporary report sheet after printing.

I can do this manually but its better to do it VBA.  Any suggestion please.
Thanks in advance.


davegla

-- 
--
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our Facebook Group @ http://www.facebook.com/group.php?gid=287779555678
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com


HELP US GROW !!

We reach over 6,800 subscribers worldwide and receive many nice notes about the 
learning and support from the group.Let friends and co-workers know they can 
subscribe to group at http://groups.google.com/group/excel-macros/subscribe

$$Excel-Macros$$ index match lookup

2010-03-15 Thread OSAVentures Calamba
dear helpful experts,

how to find the corresponding value in a column matching 2 criterias.

please help with this look up formula to find the value as per attached
worksheet.  many many thanks to all.


thanks
davegla

-- 
--
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our Facebook Group @ http://www.facebook.com/group.php?gid=287779555678
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com


HELP US GROW !!

We reach over 6,800 subscribers worldwide and receive many nice notes about the 
learning and support from the group.Let friends and co-workers know they can 
subscribe to group at http://groups.google.com/group/excel-macros/subscribe


Book2.xls
Description: MS-Excel spreadsheet


Re: $$Excel-Macros$$ Need of VBA

2010-03-09 Thread OSAVentures Calamba
great answer

On Tue, Mar 9, 2010 at 12:02 AM, Paul Schreiner schreiner_p...@att.netwrote:

 If I follow your question correctly, you're asking:  why would I need
 vba?

 the answer is directly related to time, and repetition.

 At our location, we had an employee that spent 2 MONTHS gathering and
 organizing data
 related to Access Control for file shares
 Then, generate 228 reports of nearly a million records for 30 members to
 review.
 The next month was spent gathering the results of the reviews, and making
 corrections.
 Then, the next 2 months were used to generate the lists for Lotus Notes
 databases.
 Another month spent gathering the results, and the whole process was
 repeated.

 In addition, the review process was manually-intensive.

 After writing a few hundred lines of VBA code (taking approximately 40
 hours to write and debug),
 the 228 reports were generated in 11 MINUTES.
 In addition, 90% of the review portion was completed electronically,
 leaving the reviewers
 to only deal with the exceptions, which reduced the review time from weeks
 to hours.

 so, in this case, all the tasks could be completed in Excel, but why?
 Instead of hundreds of man-hours spent in doing the work in Excel, the
 process could be completed in minutes.

 Now, if you're preparing 1000 lines of data to be DISTRIBUTED to 80
 members,
 then that's an hour's worth of work, and perhaps not worth automating.
 But if the 80 members each require a SUBSET of the 1000 lines,
 and it takes an hour for EACH REPORT, well NOW I'd be looking for a way to
 automate it!!!


 hope that answers your question.

 Paul



  --
 *From:* pratap sunilpratapsingh1...@gmail.com
 *To:* MS EXCEL AND VBA MACROS excel-macros@googlegroups.com
 *Sent:* Mon, March 8, 2010 9:59:38 AM
 *Subject:* $$Excel-Macros$$ Need of VBA

 Hi,

 Good evening to all,

 I am working as a RTA (Real time analyst) in FIS, my job is to Prepare
 data for a team of 80 members in excel, i am looking for a job of
 analyst.
 Can anyone one tell me what is the need of VBA or why VBA is required
 when i can complete my all tasks in excel.

 Sunil

 --

 --
 Some important links for excel users:
 1. Follow us on TWITTER for tips tricks and links :
 http://twitter.com/exceldailytip
 2. Join our Facebook Group @
 http://www.facebook.com/group.php?gid=287779555678
 3. Excel tutorials at http://www.excel-macros.blogspot.com
 4. Learn VBA Macros at http://www.quickvba.blogspot.com
 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com

 To post to this group, send email to excel-macros@googlegroups.com

 
 HELP US GROW !!

 We reach over 6,800 subscribers worldwide and receive many nice notes about
 the learning and support from the group.Let friends and co-workers know they
 can subscribe to group at
 http://groups.google.com/group/excel-macros/subscribe

 --

 --
 Some important links for excel users:
 1. Follow us on TWITTER for tips tricks and links :
 http://twitter.com/exceldailytip
 2. Join our Facebook Group @
 http://www.facebook.com/group.php?gid=287779555678
 3. Excel tutorials at http://www.excel-macros.blogspot.com
 4. Learn VBA Macros at http://www.quickvba.blogspot.com
 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com

 To post to this group, send email to excel-macros@googlegroups.com

 
 HELP US GROW !!

 We reach over 6,800 subscribers worldwide and receive many nice notes about
 the learning and support from the group.Let friends and co-workers know they
 can subscribe to group at
 http://groups.google.com/group/excel-macros/subscribe


-- 
--
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our Facebook Group @ http://www.facebook.com/group.php?gid=287779555678
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com


HELP US GROW !!

We reach over 6,800 subscribers worldwide and receive many nice notes about the 
learning and support from the group.Let friends and co-workers know they can 
subscribe to group at http://groups.google.com/group/excel-macros/subscribe


Re: $$Excel-Macros$$ How to select unique values from a list and copy each unique value to another location of another worksheet

2010-02-28 Thread OSAVentures Calamba
Thanks to all the great suggestions provided.

On Fri, Feb 26, 2010 at 7:36 PM, Dave Bonallack
davebonall...@hotmail.comwrote:

  Hi OSAVentures,

 Have a look at the attached to see if you can adapt it to your own needs.

 Regards - Dave.*
 *
 --
 Date: Fri, 26 Feb 2010 14:53:14 +0800
 Subject: $$Excel-Macros$$ How to select unique values from a list and copy
 each unique value to another location of another worksheet
 From: osav...@gmail.com
 To: excel-macros@googlegroups.com


 How to select unique values from a list and copy each to  another location
 of another worksheet?  Not using auto-filter or advance filter?

 Thanks.

 --

 --
 Some important links for excel users:
 1. Follow us on TWITTER for tips tricks and links :
 http://twitter.com/exceldailytip
 2. Join our Facebook Group @
 http://www.facebook.com/group.php?gid=287779555678
 3. Excel tutorials at http://www.excel-macros.blogspot.com
 4. Learn VBA Macros at http://www.quickvba.blogspot.com
 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com

 To post to this group, send email to excel-macros@googlegroups.com

 
 HELP US GROW !!

 We reach over 6,800 subscribers worldwide and receive many nice notes about
 the learning and support from the group.Let friends and co-workers know they
 can subscribe to group at
 http://groups.google.com/group/excel-macros/subscribe

 --
 Browse profiles for free! View photos of singles in your 
 area.http://clk.atdmt.com/NMN/go/150855801/direct/01/

 --

 --
 Some important links for excel users:
 1. Follow us on TWITTER for tips tricks and links :
 http://twitter.com/exceldailytip
 2. Join our Facebook Group @
 http://www.facebook.com/group.php?gid=287779555678
 3. Excel tutorials at http://www.excel-macros.blogspot.com
 4. Learn VBA Macros at http://www.quickvba.blogspot.com
 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com

 To post to this group, send email to excel-macros@googlegroups.com

 
 HELP US GROW !!

 We reach over 6,800 subscribers worldwide and receive many nice notes about
 the learning and support from the group.Let friends and co-workers know they
 can subscribe to group at
 http://groups.google.com/group/excel-macros/subscribe


-- 
--
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our Facebook Group @ http://www.facebook.com/group.php?gid=287779555678
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com


HELP US GROW !!

We reach over 6,800 subscribers worldwide and receive many nice notes about the 
learning and support from the group.Let friends and co-workers know they can 
subscribe to group at http://groups.google.com/group/excel-macros/subscribe


$$Excel-Macros$$ How to select unique values from a list and copy each unique value to another location of another worksheet

2010-02-26 Thread OSAVentures Calamba
How to select unique values from a list and copy each to  another location
of another worksheet?  Not using auto-filter or advance filter?

Thanks.

-- 
--
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our Facebook Group @ http://www.facebook.com/group.php?gid=287779555678
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com


HELP US GROW !!

We reach over 6,800 subscribers worldwide and receive many nice notes about the 
learning and support from the group.Let friends and co-workers know they can 
subscribe to group at http://groups.google.com/group/excel-macros/subscribe


$$Excel-Macros$$ Excel 2003 macro printing a named range

2010-02-17 Thread OSAVentures Calamba
*Dear Gurus,*

I'm trying to clean up my vba code for printing a named ranged.  My problem
is i want to ask the user to input a data to meet a criteria, and then if
that while that criteria is true, it prints a certain range.

Here's my  code, IT DOESNT SEEM TO PRINT THE RANGE SPECIFIED BY THE USER
INPUT.
My worksheet PayDbase contains ID No.[column A] , Name [ Column b],
Section [column c]:  My purpose of running this macro is to be able to print
selected paylips based on the range input from user.

Private Sub SelectedSlips()
With Application
  .ScreenUpdating = False
  .DisplayAlerts = False
End With
Dim FindString As String
Dim StartFrom As String
Dim EndTo As String
Dim Rng As Range
Dim IDrng As Range
Dim found As Boolean
'On Error GoTo Err_Execute
FindString = InputBox(Enter a Payroll Period to Print)
'StartFrom = Worksheets(PayDbase).Range(P14).Value
'EndTo = Worksheets(PayDbase).Range(P17).Value
If MsgBox( Printer Properly Set-up?, vbYesNo + vbQuestion) = vbNo Then
Exit Sub
End If
If Trim(FindString)   Then
   With Sheets(PayDbase).Range(E:E)
Set Rng = .find(What:=FindString, _
After:=.Cells(.Cells.Count), _
LookIn:=xlValues, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)
If Not Rng Is Nothing Then
found = True
Application.GoTo Rng, True
StartFrom = InputBox(FROM WHAT
ID-NO?)
EndTo = InputBox(TO ID -NO?)
'Worksheets(PaySlip).Range(P17).Value = EndTo
With Sheets(PayDbase).Range(A:A)
Set IDrng = .find(What:=StartFrom, _
After:=.Cells(.Cells.Count), _
LookIn:=xlValues, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)
If Not IDrng Is Nothing Then
Application.GoTo IDrng, True
Else
' Select cell b7, first line of data computation sheet.
Sheets(PayDbase).Activate
'selects the first IDno
ActiveCell.Offset(0, -4).Select
Selection.Copy
Sheets(PAYSLIP).Select
Range(D4).Select
Selection.PasteSpecial paste:=xlPasteValues
Application.CutCopyMode = False
End If
End With
Do While found = True
Worksheets(PayDbase).Select
'Application.Goto IDrng, True
'checks the next findstring if true
ActiveCell.Offset(1, 4).Select
If ActiveCell.Value  FindString Then
found = False
MsgBox Printing finished!, vbInformation
Exit Do
End If
'gets the next idno again
ActiveCell.Offset(0, -4).Select
Selection.Copy
Sheets(PAYSLIP).Select
Range(D$41).Select
Selection.PasteSpecial paste:=xlPasteValues
Application.CutCopyMode = False
ActiveSheet.Calculate
Range(B1:N68).Select
Selection.PrintOut copies:=1
Sheets(PayDbase).Select
ActiveCell.Offset(0, 4).Select
ActiveCell.Offset(1, -4).Select
Selection.Copy
Sheets(PAYSLIP).Select
Range(D4).Select
Selection.PasteSpecial paste:=xlPasteValues
Application.CutCopyMode = False
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlBottom
End With
Loop
With Application
.ScreenUpdating = True
.DisplayAlerts = True
End With
Else
MsgBox ATTENTION! The PERIOD selected is not yet
posted!, vbInformation
End If
'Err_Execute:
   'MsgBox An error occurred.  vbCr  vbCr  Error:   Error$
End With
End If
End Sub

-- 

Re: $$Excel-Macros$$ Re: vba to close workbook if last row with data = 10

2009-11-11 Thread OSAVentures Calamba
Thank you Hemant,

 I'm just limiting the number of records the user is able to store. I'm
using template, before going further user has to input some codes to
proceed.

Thnks.

On Thu, Nov 12, 2009 at 12:08 AM, Hemant Hegde hemantbales...@gmail.comwrote:

 Hi :)

 Why do you want to do that with the poor user? (he will have to re-open it
 and probably with macros turned off)

 You can

 Protect the sheet or

 Set the scroll area by putting this code :
 Sheets(name).scrollArea=A1:Z10

 If you anyway want to close the workbook, this can help

 write

 If not isblank(target) then:thisworkbook.close(false)

 inside worksheet_change() event


 With regards

 Hemant Hegde


 On 10/11/2009, OSAVentures Calamba osav...@gmail.com wrote:

 Dear Paul and gurus,

 I want to find the last row. Is this OK?

 Private Sub Worksheet_Change(ByVal Target As Range)

 Dim LastRow As Long

   If WorksheetFunction.CountA(Cells)  0 Then
 'Search for any entry, by searching backwards by Rows.
 LastRow = Cells.Find(What:=*, After:=[A1], _
  SearchOrder:=xlByRows, _
  SearchDirection:=xlPrevious).Row
 MsgBox LastRow   You cant go beyond this workbook closed.

 end sub

 or somthing like this.

 Private Sub Worksheet_Change(ByVal Target As Range)

 Dim LastRow As Long
 LastRow = ActiveSheet.UsedRange.Rows.Count
 if LastRow=10 then

 MsgBox LastRow   You cant go beyond this workbook closed.
 endif
 end sub

 Thanks

 On Mon, Nov 9, 2009 at 8:34 PM, Paul schreiner_p...@att.net wrote:


 What do you mean by last row with data = 10?
 do you mean that row #10 has data?
 or that the last row with data has a VALUE of 10 in a specific column?
 will there be data in rows 1-9?
 What columns will the data be in? look for ANY data in row 10?

 What do you want to use to trigger the event?
 When does the last row change to 10?

 do you want to save the workbook when it closes?

 You could create an event:
 Private Sub Worksheet_Change(ByVal Target As Range)

 test for whatever you're testing for:
  If (Target.Row = 10) then

 then:


 ThisWorkbook.Close savechanges:=False




 On Nov 8, 11:31 pm, OSAVentures Calamba osav...@gmail.com wrote:
  dear gurus,
 
  i need to close a workbook if last row with data =10,  Any VBA
 suggestion
  please?
 
  dellosa






 --
 Hemant Hegde
 --~--~-~--~~~---~--~~
 --

 Some important links for excel users:
 1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at
 http://www.excelitems.com
 2. Excel tutorials at http://www.excel-macros.blogspot.com
 3. Learn VBA Macros at http://www.vbamacros.blogspot.com
 4. Excel Tips and Tricks at http://exceldailytip.blogspot.com

 To post to this group, send email to excel-macros@googlegroups.com
 If you find any spam message in the group, please send an email to:
 Ayush Jain  @ jainayus...@gmail.com or
 Ashish Jain @ 26may.1...@gmail.com
 
 HELP US GROW !!

 We reach over 6,500 subscribers worldwide and receive many nice notes about
 the learning and support from the group. Our goal is to have 10,000
 subscribers by the end of 2009. Let friends and co-workers know they can
 subscribe to group at
 http://groups.google.com/group/excel-macros/subscribe
 -~--~~~~--~~--~--~---



-- 
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com

HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe

$$Excel-Macros$$ Re: vba to close workbook if last row with data = 10

2009-11-09 Thread OSAVentures Calamba
good morning Paul  Paulo

I like both your name..  Well sorry for confusing you.. anyway. i think you
are right i need to put some vba in that worksheet where if the rows with
data is 10 or more.  ( yes rows 1-9 has data)

I want to limit the inputs of the user to upto 10 rows only.  the worksheet
should trigger message and close workbook if data is beyond row number 10.
if any data is inputted beyond that, the workbook closes.



On Mon, Nov 9, 2009 at 7:03 PM, PauloBR parauj...@gmail.com wrote:


 Good Morning Dellosa,

 How many rows and columns do you have in your sheet?

 Please, give us more information about your problem...

 Best Regards

 On 9 nov, 02:31, OSAVentures Calamba osav...@gmail.com wrote:
  dear gurus,
 
  i need to close a workbook if last row with data =10,  Any VBA suggestion
  please?
 
  dellosa

 


--~--~-~--~~~---~--~~
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com

HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe
-~--~~~~--~~--~--~---



$$Excel-Macros$$ Re: vba to close workbook if last row with data = 10

2009-11-09 Thread OSAVentures Calamba
Dear Paul,

'This is the event
Private Sub Worksheet_Change(ByVal Target As Range)

' i want to test if the last row is with data is 10th row or greater.
is there a need for dim declaration?  Basically a code to test if the user
is using the 10th row or more. I want to limit the data until row number 10
of column b only only.

test for whatever you're testing for:
 If (Target.Row = 10) then

then:


ThisWorkbook.Close savechanges:=False


On Mon, Nov 9, 2009 at 8:34 PM, Paul schreiner_p...@att.net wrote:


 What do you mean by last row with data = 10?
 do you mean that row #10 has data?
 or that the last row with data has a VALUE of 10 in a specific column?
 will there be data in rows 1-9?
 What columns will the data be in? look for ANY data in row 10?

 What do you want to use to trigger the event?
 When does the last row change to 10?

 do you want to save the workbook when it closes?

 You could create an event:
 Private Sub Worksheet_Change(ByVal Target As Range)

 test for whatever you're testing for:
  If (Target.Row = 10) then

 then:


 ThisWorkbook.Close savechanges:=False




 On Nov 8, 11:31 pm, OSAVentures Calamba osav...@gmail.com wrote:
  dear gurus,
 
  i need to close a workbook if last row with data =10,  Any VBA suggestion
  please?
 
  dellosa
 


--~--~-~--~~~---~--~~
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com

HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe
-~--~~~~--~~--~--~---



$$Excel-Macros$$ Re: vba to close workbook if last row with data = 10

2009-11-09 Thread OSAVentures Calamba
Dear Paul and gurus,

I want to find the last row. Is this OK?

Private Sub Worksheet_Change(ByVal Target As Range)

Dim LastRow As Long

  If WorksheetFunction.CountA(Cells)  0 Then
'Search for any entry, by searching backwards by Rows.
LastRow = Cells.Find(What:=*, After:=[A1], _
 SearchOrder:=xlByRows, _
 SearchDirection:=xlPrevious).Row
MsgBox LastRow   You cant go beyond this workbook closed.

end sub

or somthing like this.

Private Sub Worksheet_Change(ByVal Target As Range)

Dim LastRow As Long
LastRow = ActiveSheet.UsedRange.Rows.Count
if LastRow=10 then

MsgBox LastRow   You cant go beyond this workbook closed.
endif
end sub

Thanks

On Mon, Nov 9, 2009 at 8:34 PM, Paul schreiner_p...@att.net wrote:


 What do you mean by last row with data = 10?
 do you mean that row #10 has data?
 or that the last row with data has a VALUE of 10 in a specific column?
 will there be data in rows 1-9?
 What columns will the data be in? look for ANY data in row 10?

 What do you want to use to trigger the event?
 When does the last row change to 10?

 do you want to save the workbook when it closes?

 You could create an event:
 Private Sub Worksheet_Change(ByVal Target As Range)

 test for whatever you're testing for:
  If (Target.Row = 10) then

 then:


 ThisWorkbook.Close savechanges:=False




 On Nov 8, 11:31 pm, OSAVentures Calamba osav...@gmail.com wrote:
  dear gurus,
 
  i need to close a workbook if last row with data =10,  Any VBA suggestion
  please?
 
  dellosa
 


--~--~-~--~~~---~--~~
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com

HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe
-~--~~~~--~~--~--~---



$$Excel-Macros$$ lookuphelp

2009-11-08 Thread OSAVentures Calamba
Dear Dave and Dilip,

The solution you suggested where out of the box. Its genuis, While I solved
it by naming uniquely each rows, and implement ifs to lookup on it based
on criteria. Although returning the correct values, I discarded my long
formula and adapted your great ideas.

Its simply magic.

Dellosa

--~--~-~--~~~---~--~~
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com

HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe
-~--~~~~--~~--~--~---



$$Excel-Macros$$ vba to close workbook if last row with data = 10

2009-11-08 Thread OSAVentures Calamba
dear gurus,

i need to close a workbook if last row with data =10,  Any VBA suggestion
please?

dellosa

--~--~-~--~~~---~--~~
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com

HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe
-~--~~~~--~~--~--~---



$$Excel-Macros$$ Fwd: FW: lookuphelplease.xls

2009-11-05 Thread OSAVentures Calamba
Dear Gurus,



Im trying to look up a value from a table and return a cell reference in a
that worksheet based on the value returned.

quite tricky and i need your help.





I attached a file to explain.





Dellosa

--~--~-~--~~~---~--~~
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com

HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe
-~--~~~~--~~--~--~---



lookuphelplease.xls
Description: MS-Excel spreadsheet


$$Excel-Macros$$ macro sometimes working sometimes not!

2009-10-28 Thread OSAVentures Calamba
Hello Excel Gurus, Im not sure why this macro works and sometimes not.
Could you please comment.

Sub Find_First_before_ Copy_Paste()
With Application
  .ScreenUpdating = False
  .DisplayAlerts = False
End With
Dim FindString As Integer
Dim Rng As Range
FindString = Sheets(Computation).Range(F7).Value
If Trim(FindString)   Then
With Sheets(PayDbase).Range(E:E)
Set Rng = .find(What:=FindString, _
After:=.Cells(.Cells.Count), _
LookIn:=xlValues, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)
If Not Rng Is Nothing Then
MsgBox THE PAYROLL PERIOD YOU ARE TYRING TO POST IS ALREADY
CLOSED! 
Else
'paste the entire ranged named to dbase worksheet
ActiveSheet.Calculate
Worksheets(Computation).Range(compute).Copy
Sheets(PayDbase).Select
ActiveSheet.Unprotect Password:=tkh701
Range(A65536).Select
Selection.End(xlUp).Select
ActiveCell.Offset(1, 0).Select
Selection.PasteSpecial paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False  '  the code shows error here says
 PasteSpecial Range method class failed!
Application.CutCopyMode = False
MsgBox Posting Payroll Successful, you may print payslips now!
ActiveSheet.Protect Password:=tkh701
'MsgBox Nothing found
End If
End With
End If
End Sub

--~--~-~--~~~---~--~~
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com

HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe
-~--~~~~--~~--~--~---



$$Excel-Macros$$ Re: copy paste while copycell is not empty

2009-10-28 Thread OSAVentures Calamba
, _
'   Transpose:=False
'   Application.CutCopyMode = False

 'Again declaring and setting the sourceRange adn
 targetCell this way
'simplifies the code.
'Notice that I am not using the Select method at all.
Dim targetCell As Range
Set targetCell = Worksheets(PayDbase).Range(A 
 Rows.Count).End(xlUp).Offset(1)
 Dim sourceRange As Range
Set sourceRange = Worksheets(Computation).Range
 (Compute)
sourceRange.Copy
targetCell.PasteSpecial Paste:=xlPasteValues

 MsgBox Payroll closed and posted, you may print
 payslips now!

Else
MsgBox Payroll Period is already posted!
End If
End With
 End If

With Application
.ScreenUpdating = True
.DisplayAlerts = True
End With

 Err_Execute:
MsgBox An error occurred.  vbCr  vbCr  Error:   Error$
 End Sub

 Hope this helped,
 Rolf

 On Oct 27, 8:54 pm, OSAVentures Calamba osav...@gmail.com wrote:
  @Rolf Thank you very much for your help. You are sent by angels.
   I read your code and tried to self understand the logic because im just
 a
  beginner. I made some remarks. I also pasted here my revised code which i
  adopted from many sites to suit my actual situation. I rename
  Post_to_summary TO Post_to_Dbase ( second before your email came in). Is
 it
  better if you can comment your logic flow for beginners like me.
 
  Sub Post_to_Dbase()
  'suppressing screen
  With Application
.ScreenUpdating = False
.DisplayAlerts = False
  End With
  'declaring variable
  Dim PayPeriod As Integer
  Dim Rng As Range
  'in case of error what ever reason
  On Error GoTo Err_Execute
  'Retrieve date value to search for
  PayPeriod = Sheets(Computation).Range(B7).Value
  'select worksheet to paste append from if the variable is exiting
  If PayPeriod   Then
  With Sheets(PayDbase).Range(B:B)
  Set Rng = .Find(What:=PayPeriod, _
  After:=.Cells(.Cells.Count), _
  LookIn:=xlValues, _
  LookAt:=xlWhole, _
  SearchOrder:=xlByRows, _
  SearchDirection:=xlNext, _
  MatchCase:=False)
  If Not Rng Is Nothing Then
  'paste the entire ranged named to dbase worksheet
  ActiveSheet.Calculate
  Worksheets(Computation).Range(compute).Copy
  Sheets(PayDbase).Select
  Range(A65536).Select
  Selection.End(xlUp).Select
  'one empty row down to paste the values
  ActiveCell(1, 0).Select
  Worksheets(PayDbase).Range(a6).PasteSpecial
  Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
  :=False, Transpose:=False
  Application.CutCopyMode = False
  MsgBox Payroll closed and posted, you may print payslips
 now!
  Else
  MsgBox Payroll Period is already posted!
  End If
  End With
  With Application
  .ScreenUpdating = True
  .DisplayAlerts = True
  End With
  Err_Execute:
  MsgBox An error occurred.
  End Sub
 
 
 
 
 
  On Wed, Oct 28, 2009 at 4:00 AM, RolfJ r...@pacificsound.us wrote:
 
   I took another look at your workbook and think I have a reasonable
   solution for your Post_to_Summary routine:
 
   Sub Post_to_Summary()
 
  With Application
.ScreenUpdating = False
.DisplayAlerts = False
  End With
 
   Dim nPeriod As String  ' my period is an integer coz of some math
   operations somewhere
  nPeriod = Range(Compute).Cells(1, 5).Value
 
  Dim targetColumn As Range
  'this code pasting the range compute already? ' compute is dynamic
   named ranged already?*
   *
 
  * *
 
 
 
 
 
   Set targetColumn = Worksheets(DBase).Columns(E)
  Dim targetCell As Range
 
  Application.CutCopyMode = False
 
  Set targetCell = targetColumn.Find(What:=nPeriod,
   After:=targetColumn.Cells(1, 1), LookIn:=xlFormulas, LookAt _
  :=xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext,
   MatchCase:= _
  False, SearchFormat:=False)
 
  If targetCell Is Nothing Then
  Set targetCell = Worksheets(DBase).Range(E 
   Rows.Count).End(xlUp).Offset(1, -4)
  Dim sourceRange As Range
  Set sourceRange = Worksheets(Computation).Range(Compute)
  sourceRange.Copy
  targetCell.PasteSpecial Paste:=xlPasteValues
  End If
 
  Application.CutCopyMode = False
   With Application
  .ScreenUpdating = True
  .DisplayAlerts = True
  End With
 
   End Sub
 
   I am still a bit fuzzy on what you are trying to accomplish with your
   Prints_All_slips routine, but maybe this code does what you are
   looking

$$Excel-Macros$$ Re: copy paste while copycell is not empty

2009-10-27 Thread OSAVentures Calamba
iRow = iRow + 1
nSlip = nSlip + 1
Loop
End If

With Application
  .ScreenUpdating = True
  .DisplayAlerts = True
End With

 End Sub

 Hope this helped,
 Rolf




 On Oct 27, 3:44 am, OSAVentures Calamba osav...@gmail.com wrote:
  @Rolf Thank you very much. I attached my reduced sheet with explanation.
  ...*you say 'it
  stops'. [macro stops running or break] Also, what to you mean to indicate
  with the - debugs here flag?* *[when the macro breaks it points to
 that
  line.]*
 
  I've 'painfully revised the code. the updated one is below. quite
  complicated for a beginner like me.
 
  below is my erratic code to paste the entire named ranged to my dbase
  worksheet. I want to insert a code where it should stop posting if the
  values is found in the dbase already. [ explained in the attached
 worksheet]
 
  this one also overwrites data in the dbase worksheet.  which should not
 be.
  it should append only on the next row containing data.
 
  Sub Post_to_Summary()
  With Application
.ScreenUpdating = False
.DisplayAlerts = False
  End With
  Worksheets(Computation).Range(compute).Copy
  Worksheets(PayDbase).Range(a6).PasteSpecial Paste:=xlPasteValues,
  Operation:=xlNone, SkipBlanks _
  :=False, Transpose:=False
  Application.CutCopyMode = False
  'Range(compute).Select
  'Selection.Copy
  'Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
  SkipBlanks _
  :=False, Transpose:=False
  With Application
  .ScreenUpdating = True
  .DisplayAlerts = True
  End With
  End Sub
 
  Below is my  code ( full of error ) to copy_paste_print as explained in
 the
  [attached worksheet].  I just get some code from macro recording.
 
  Sub Prints_All_slips()
  With Application
.ScreenUpdating = False
.DisplayAlerts = False
  End With
  If MsgBox( Printer Properly Set-up?, vbYesNo + vbQuestion) = vbNo
 Then
  Exit Sub
  Else
' Select cell b7, first line of data computation sheet.
  'Do Until IsEmpty(ActiveCell)
  Sheets(Computation).Select
  Range(B7).Select
  Selection.Copy
  'ActiveCell.Offset(1, 0).Select
  Sheets(PAYSLIP).Select
  Range(D4).Select
  Selection.PasteSpecial Paste:=xlPasteValues
  Application.CutCopyMode = False
  Do Until IsEmpty(ActiveCell)
  Sheets(Computation).Select
  ActiveCell.Offset(1, 0).Select
  Selection.Copy
  Sheets(PAYSLIP).Select
  Range(D41).Select
  Selection.PasteSpecial Paste:=xlPasteValues
  Application.CutCopyMode = False
  'Print_All_Pay
  Range(B1:N68).Select
  Selection.PrintOut Copies:=1
  'Print_All_Pay
  Sheets(Computation).Select
  ActiveCell.Offset(1, 0).Select
  Selection.Copy
  Sheets(PAYSLIP).Select
  Range(D4).Select
  Selection.PasteSpecial Paste:=xlPasteValues
  Application.CutCopyMode = False
  With Selection
  .HorizontalAlignment = xlGeneral
  .VerticalAlignment = xlBottom
 End With
 Loop
 With Application
.ScreenUpdating = True
.DisplayAlerts = True
  End With
   End If
  End Sub
 
 
 
  On Tue, Oct 27, 2009 at 12:15 PM, RolfJ r...@pacificsound.us wrote:
 
   I am having difficulties following what you would like to do. In
   particular it is not clear to me what you mean when you say 'it
   stops'. Also, what to you mean to indicate with the - debugs here
   flag?
 
   Please post or e-mail example worksheets and I'll take a closer look.
 
   On Oct 26, 6:28 pm, OSAVentures Calamba osav...@gmail.com wrote:
Dear Macro Experts,
 
I'm just starting to write a macro.  What I'm trying to do is I want
 to
   copy
a value from 'computation' sheet.column B and posting it as values in
   'Slip'
range D4 and do that while sheet.columnB is not empty.  Below is
 the
   code
i made but stops.
 
Sub copyIDtopay()
With Application
  .ScreenUpdating = False
  .DisplayAlerts = False
End With
  ' Select cell b7, first line of data computation sheet.
Do Until IsEmpty(ActiveCell)
Worksheets(Computation).Range(B7).Copy   -debugs
 here
Worksheets(SLIP).Range(D4).PasteSpecial
 Paste:=xlPasteValues
Sheets(Computation).Select
ActiveCell.Offset(1, 0).Select
Selection.Copy
Sheets(SLIP).Select
Range(D41).Select
ActiveSheet.Paste
Application.CutCopyMode = False
Loop
  .ScreenUpdating = False
  .DisplayAlerts = False
 
End Sub
 
Please help me.
 
 
 
   Ptemplate.xls
  102KViewDownload- Hide quoted text -
 
  - Show quoted text

$$Excel-Macros$$ copy paste while copycell is not empty

2009-10-26 Thread OSAVentures Calamba
Dear Macro Experts,

I'm just starting to write a macro.  What I'm trying to do is I want to copy
a value from 'computation' sheet.column B and posting it as values in 'Slip'
range D4 and do that while sheet.columnB is not empty.  Below is the code
i made but stops.

Sub copyIDtopay()
With Application
  .ScreenUpdating = False
  .DisplayAlerts = False
End With
  ' Select cell b7, first line of data computation sheet.
Do Until IsEmpty(ActiveCell)
Worksheets(Computation).Range(B7).Copy   -debugs here
Worksheets(SLIP).Range(D4).PasteSpecial Paste:=xlPasteValues
Sheets(Computation).Select
ActiveCell.Offset(1, 0).Select
Selection.Copy
Sheets(SLIP).Select
Range(D41).Select
ActiveSheet.Paste
Application.CutCopyMode = False
Loop
  .ScreenUpdating = False
  .DisplayAlerts = False

End Sub

Please help me.

--~--~-~--~~~---~--~~
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com

HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe
-~--~~~~--~~--~--~---



$$Excel-Macros$$ Printing In Excel - VBA

2009-10-22 Thread OSAVentures Calamba
Good day All,

I'm writing to request your idea.  Here is my problem.
I have a template workbook with many multiple sheets.  In one sheet(1)   I
have values in a column A. say row1 = 1, row2=2.. and so on...
I want to print a certain range in another sheet(2) up to the last value in
column a of sheet(1).

But before printing the sheet(2) range a value from sheet(1) is pick-up and
'posted' to sheet(2).

Thanks for your help.  I'm not good in Macro.  Attached file to explain.


Dellosa

--~--~-~--~~~---~--~~
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com

HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe
-~--~~~~--~~--~--~---



Printingproblem.xls
Description: MS-Excel spreadsheet


$$Excel-Macros$$ Re: Help to break vbaproject password

2009-10-18 Thread OSAVentures Calamba
cracking password of other programmers without his knowledge is a bad habit
much less a moral crime and a disrespect to the author. I hope this forum do
not tolerate this practice.  let us help each other in the right way as we
always do. thanks for understanding.

On Mon, Oct 19, 2009 at 1:37 AM, Dilip Pandey dilipan...@gmail.com wrote:

 Hi Kamal,

 I am having a software installed in my PC, which can crack the excel
 password.
 I got it installed from my vendor at the time of assembling of my system.
 If you feel OK, then send me the zipped workbook and I can try un-locking
 it for you.

 Let me know if you need any other help.  Thanks
 --
 DILIP KUMAR PANDEY
MBA-HR,B COM(Hons.),BCA
 Mobile: +91 9810929744
 dilipan...@gmail.com
 dilipan...@yahoo.com
 New Delhi - 110062


 On 10/16/09, kamal shah kamal...@gmail.com wrote:

 Hi Dilip

 I am more keen to know how to get VBA Project password.
 I got few macros written by a EX-colleague and those are password
 protected.
 Wanted to have a look at it to add some possible enhancement to it.

 Thanks,
 Kamal

  On Sun, Aug 16, 2009 at 1:56 PM, Dilip Pandey dilipan...@gmail.comwrote:

 Dear Mahesh,

 Please find the unprotected file.  I have removed Worksheet passwords
 + VBA Password.  Thanks

 --
 DILIP KUMAR PANDEY
   MBA-HR,B COM(Hons.),BCA
 Mobile: +91 9810929744
 dilipan...@gmail.com
 dilipan...@yahoo.com
 New Delhi - 110062



 On 8/15/09, mahesh parab mahes...@gmail.com wrote:
  Dear All
 
  Can anyone break the vbaproject password of attach file, Please send me
 the
  link or software if anyone can.
 
 
 
 
  Thank You
 
  
 
 


--~--~-~--~~~---~--~~
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com

HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe
-~--~~~~--~~--~--~---



$$Excel-Macros$$ Re: Enable V Look up Option on the Excel Sheet.

2009-10-05 Thread OSAVentures Calamba
There are many lookups, what kind of information you need to warrant the
lookup function. Please tell us what is your problem precisely.  dont make
us guess.

On Sat, Oct 3, 2009 at 12:20 PM, Equity Monk equitym...@gmail.com wrote:

 Dear Friends,

 I am attaching a portfolio. It is a mf portfolio.
 If you can pls attach a v look up function to it that would be great.

 The website from where the link can come is http://www.amfiindia.com/.

 Looking fwd to your help.

 


--~--~-~--~~~---~--~~
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com

HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe
-~--~~~~--~~--~--~---



$$Excel-Macros$$ status bar

2009-10-05 Thread OSAVentures Calamba
dear excel genuises,

may i request your help how to change the default message in excel 2003
status bar?  and prevent the user from changing it.
thanks a lot. may god shower you with graces.

dellosa

--~--~-~--~~~---~--~~
--
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com

HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe
-~--~~~~--~~--~--~---