Search results

  1. V

    Is there a better way?

    Made that change, still same error. wsNew(Month(rsLeave![Start Date])).cells(rownum, rsLeave![Start Date] + i).BackColor = vbGreen thats the line that is highlighted.
  2. V

    Is there a better way?

    I am getting "Object doesn't support this property or method" rownum = 1 While Not rsLeave.EOF rownum = rownum + 1 For i = 0 To DateDiff("d", rsLeave![Start Date], rsLeave![End Date]) wsNew(Month(rsLeave![Start Date])).cells(rownum, rsLeave![Start Date] +...
  3. V

    Is there a better way?

    Oh makes sense now thank you, I will attempt to do this this week.
  4. V

    Is there a better way?

    quick question before I start. your rownum variable thats each column correct? the dates start at the 4th column.
  5. V

    Is there a better way?

    so I have NO CLUE how to do the things y'all have stated. So far in my coding I have done easy stuff. Looping would probably be the best but how do I set up the parameters so when it goes down the list in the RS that it puts the leave in the right place?
  6. V

    Is there a better way?

    this is what the spreadsheet looks like. Like say someone has leave from the 5th - 10th. I want to grab that ID # and shade in those days on the spreadsheet. How do I find that specific column on the right months sheet?
  7. V

    Is there a better way?

    Last piece I need to finish this document. I need a way to pull the data from my rsLeave and put it into the spreadsheet. It needs to have the start date and end date of the leave as well as the space between all shaded and merged. Dim xlApp As Object Dim xlWB As Object Dim...
  8. V

    Is there a better way?

    yeah they are trying to incorporate the newly created database with an old used system to track leave. Command wants a 1 stop shop instead of having to input the leave data into 2 different locations. It is causing me a headache.
  9. V

    Is there a better way?

    so far I have: Dim xlApp As Object Dim xlWB As Object Dim wsNew As Object Dim rsRoster As DAO.Recordset Dim rsLeave As DAO.Recordset Dim dbCurr As DAO.Database Dim strRoster As String Dim strLeave As String Dim x As Long ' 'Set variables Set...
  10. V

    Is there a better way?

    awesome that worked and I added a few other things but do I have to add in a seperate if statement for each month to add in the month at the top?? Select Case wsNew.Name Case "January", "March", "May", "July", "August", "October", "December"...
  11. V

    Is there a better way?

    fixed that I didn't have xlWB infront of the first worksheets.add. I am now trying to add in the days and am getting mismatch error. If wsNew.Name = ("January" Or "March" Or "May" Or "July" Or "August" Or "October" Or "December") Then wsNew.Range("D2:E2").Autofill...
  12. V

    Is there a better way?

    I am getting an "Object Required" error on the set wsNew line Dim xlApp As Object Dim xlWB As Object Dim wsNew As Object Dim x As Long ' 'Set variables Set xlApp = CreateObject("Excel.Application") Set xlWB = xlApp.Workbooks.Add xlApp.Visible = True...
  13. V

    Is there a better way?

    yeah my question has morphed a few times since it started. Mind changing and trying to get all the info needed. Currently I have a table that includes every soldiers leave submission with start dates and end dates. Currently I have an excel document that I create with the above code, it is a...
  14. V

    Is there a better way?

    oh ok yeah I can make the button just create an excel document for the current month, awesome. I could just make each of those lines into functions and just call the current month in the code. That would also make leap years easier as i can add that into the february function. ok so thinking...
  15. V

    List Box

    I have a multiselect list box in my form and I have a button that prints what is selected to PDF. I want a message box to pop up that states to ensure the selected number is not already open in pdf view. MsgBox "Please ensure that CNF " & me.lstBox.Value & " is not already open." doesn't...
  16. V

    Is there a better way?

    I want to change this from being 1 fiscal year a sheet to just having an excel document per fiscal year with each month a different sheet. How do i go about creating the 12 sheets with VBA?
  17. V

    Is there a better way?

    ok I can do that. Is the way I have the months and days the best way or is there a loop i can do to make the code smaller?
  18. V

    Is there a better way?

    I have a button that creates an Excel document. I want it make it flow better and to adjust for leap year. It has to flow October through September and have the FY as the name of the tab your on. My current code is just 1 sheet and very long, there has to be a way to make it more streamline...
  19. V

    Highlighted Search

    so thats how to manually change it. I was looking for a VBA option to add it to my code for the search. Jdraw, that is a continuous form, what I am trying to do is create a report from a form input.
  20. V

    Highlighted Search

    After reading a bunch of google and the responses here looks like if i want to have the searched text highlighted my best bet is to open the report in Word. What would that look like? Could I keep the code i have or do i have to rewrite everything?
Back
Top Bottom