Search results

  1. R

    Open userform2 and register if the user is opening the workbook for the first time...

    I have been been able to sort this out Private Sub Workbook_Open() On Error GoTo myErrorHandler: Dim User_Name As String Dim myRange As Range Dim yesNo As Variant Set myRange = Sheet2.Range("A:A") User_Name = Environ("username") yesNo = Application.WorksheetFunction.VLookup(User_Name...
  2. R

    Open userform2 and register if the user is opening the workbook for the first time...

    I have a work book with two worksheets. One is to input data “Sheet1” and other one to hold the details of the users “Sheet2”. It has two forms “Userform1” and ”Userform2” When the user opens the workbook, If the user is not in the “Sheet2” then Open Userform2, input the users details Save...
  3. R

    Are you an atheist?

    As long as people believe in god, that he has preplanned this for them ....
  4. R

    Help needed to modify the following macro

    Hi everyone, In my team at work, we have 6 people and our team leader allocates work. He inputs the details in a worksheet named zMaster.xlsm with the following headings. Item Qty Price Total Invoice Team Mbr Date Alloc A1 22 $44.21 $972.62 AD14256 Raghu A2 10 $210.44 $2104.40 AD14257 Ravi...
  5. R

    Combo box with two columns.

    My apologies! I found the solution at this site.. http://www.excel-easy.com/vba/examples/dependent-combo-boxes.html Private Sub CommandButton1_Click() Dim RowCount As Long Dim benefits, total As Single If Me.txtName.Value = "" Then MsgBox "Please enter a name", vbExclamation, "Employee Data"...
  6. R

    Combo box with two columns.

    Thanks, Gasman and Ridders. I have come to know that the combo boxes don't the same in Excel. Have to do two cascading combo boxes I have learnt to sort it out. Regards Raghu
  7. R

    Combo box with two columns.

    I have two columns in the combo box in my form. How do I make the data from the second column populate the worksheet? It is possible in Access, but not in Excel? Please look at the attached file. Thanks Regards Raghu
  8. R

    Update value in a column from another worksheet depending on the date in a range

    Thank Arnelgp I will try this out.
  9. R

    Update value in a column from another worksheet depending on the date in a range

    thanks arnelgp and Gasman. Sub updateColunm4() If duedate <= 23Aug17 then Update column 4 to PP0001 Else Update column 4 to the appropriate pay period End if End sub arnelgp I can to the if bit, how do I do the else bit? Thanks Raghu
  10. R

    Update value in a column from another worksheet depending on the date in a range

    Our new pay system at work went live in August 2017. This is the new pay calendar (called PayPeriods) Start Date End Date Pay period 10 Aug 17 23 Aug 17 PP0001 24 Aug 17 06 Sep 17 PP0002 07 Sep 17 20 Sep 17 PP0003 21 Sep 17 04 Oct 17 PP0004 05 Oct 17 18 Oct 17 PP0005 19 Oct 17 01 Nov 17 PP0006...
  11. R

    Causing out of range error - 9

    I realised...and fixed and working now thank you. 'https://www.thespreadsheetguru.com/the-code-vault/2015/3/26/loop-input-box-until-receives-correct-valid-entry Sub LoopInput_Box() Dim InputQuestion As String Dim myAnswer As String InputQuestion = "Please enter the Pmkeys Number to print...
  12. R

    Causing out of range error - 9

    Hello Everyone, I am trying to use an Input Box to prompt member to input a 7 digit number starting with 6, for example, “6014342” to select the worksheet to print. I want to trap error if the number is not 7 digits long or does not start with a “6” or is a blank or an alphabet string. The...
  13. R

    Why is this line of code not working?

    Sorted! Private Sub AnotherSheet() Dim sDate As Date Dim tDate As Date Dim PayDay As Date Dim DueDate As Date Dim PayCal As String Dim LastRow As Integer Dim i As Integer Sheets("PayPeriod").Select sDate = Range("G2").Value tDate = Range("G3").Value PayDay = Range("G4").Value PayCal =...
  14. R

    Why is this line of code not working?

    Hi all, Although I marked this as "Solved", a small change in the coding, please! How do I change the code to paste the records into another worksheet called "Report"? thank you regards Raghu
  15. R

    Why is this line of code not working?

    Thank you....Arnelgp I will consider this as solved!
  16. R

    Why is this line of code not working?

    Hi Boerbende... How do I modify the code above to give a message box, “15 (say) records have been updated”!
  17. R

    Are you an atheist?

    I am a Hindu by birth, an atheist from 14 years of age. I found that Hinduism is not a religion but a way of life. It has a place for atheist, doubtful believers and full believers.
  18. R

    Why is this line of code not working?

    thanks...Boerbende... Will try and initialise xlup properly and try again. LastRow = ActiveSheet.Range("A1").CurrentRegion.Rows.Count this worked perfectly! Regards Raghu
  19. R

    Why is this line of code not working?

    Hi All, My work has banned Access. Now I have to convert to Excel just when I am about to retire. I am trying to select rows within a date range, with the value of "No" in the fourth column. I have highlighted the line of code, not working. Please, someone, tell me what I am doing wrong...
  20. R

    Are you an atheist?

    Hi Everyone, I have been an atheist since I was 14, in 1974. No change. I am a Hindu by birth, the philosophy is live and let live. Due to my religious upbringing, I used to think I may be wrong. Richard Dawkins books has finally driven through and the logic has made me a firm atheist.
Top Bottom