Recent content by aner1755

  1. A

    Arguments in Sub

    Thanks Banana! It was fairly easy. :-) Have a blessed day!
  2. A

    Arguments in Sub

    Hi All! I wish to transform a sub to a more useful one since I'll use it sevearal times in different contexts. The sub showed below opens an Excel-workbook and clears worksheet nr 1 from its data. What I have in mind is to declare two arguments for the sub, one argument should be the...
  3. A

    Selection of a column

    A better way to do this was to; Private Sub CommandButton2_Click() Worksheets("Sheet1").Range("B2", Worksheets("Sheet1").Range("B2").End(xlDown)).Copy Worksheets("Sheet2").Range("I4").PasteSpecial Worksheets("Sheet1").Range("C2", Worksheets("Sheet1").Range("C2").End(xlDown)).Copy...
  4. A

    Selection of a column

    Ooops! Find the answer o my question; Private Sub CommandButton1_Click() Application.ScreenUpdating = False Dim myLastRow As Long Dim myLastColumn As Long Range("A1").Select On Error Resume Next myLastRow = Cells.Find("*", [A1], , , xlByRows, xlPrevious).Row myLastColumn =...
  5. A

    Selection of a column

    Hi All! How can I select a column with arbitary lenght of datarange with VBA-code? Say there is a column with 10 fields in an Excelworksheet and I wish to select them all, how do I do that? I've tried this; Worksheets("Blad1").Activate Worksheets("Blad1").Cells(1, 1).Select...
  6. A

    Use of TEXT in SQL?

    Bob, you saved me again! Thank you very much. :D
  7. A

    Use of TEXT in SQL?

    Hi All, I got a problem with the value of a control when I try to implement it to a SQL query. I got two cases, the first work but not the second. The first collect a number from a control, the second collects text from another control. I call on the controls in the same way, Me!Control1...
  8. A

    One or two queries?

    A big SALUT to you for helping me out! :-D Here is the code I finally used (just some correction of small errata in your code); SELECT tblBudgetTime.BudgetID, tblBudgetTime.[Year/Month], tblPXTime.TimePX...
  9. A

    One or two queries?

    Hi All! I need help with a SQL query. I got two tables (tblPXtime and tblBudgetTime) with columns and relationships that can be seen in the attachments. From these tables I’d like to extract the date and time, in such manner that all date and time from tblBudgetTime should be collected...
  10. A

    Clear an excel sheet

    Sweet, I googled UsedRange and that solved all problems. :D No mystic errors anymore... Thanks a lot for being a source of wisdom, darbid! I'll soon post a new thread regarding an SQL OUTER JOIN query, maybe you know about these stuff to... :cool: Best regards, Anders
  11. A

    Clear an excel sheet

    Thank you for the pieces of good code all of you. DCrake’s suggestion seems really elegant and I’ll try that when I learned some more… J For now I’m almost satisfied with one of gblack’s contributions: 'Clear the excel sheet from previous data With ObjXLApp .Range("A1").Select...
  12. A

    Clear an excel sheet

    Nice Gemma, something like that is excatly what I need. I'll try something out in case of lack of new post in this thread. If I succed I'll post it. :-D Thanks!
  13. A

    Clear an excel sheet

    Thanks Mike, for real fast response. Ok, that seems good. But how to copy a Excel sheet from within Access? The situation is like this; I export data to an Excel sheet for which a like to do analysis, i.e. draw a graph and perform some work with it. Say the impoted data goes to Sheet1, then I...
  14. A

    Clear an excel sheet

    Hi All! Before I export data from Access to an Excel sheet I want to clear that sheet from existing data. How do I do that with VBA code?
  15. A

    Data analysis; Inside ACCESS or not?

    I’m working out a good way to export my data to Excel and tested some of the techniques in DCrake’s post. When it comes to the one described under Use automation to transfer an ADO recordset to a worksheet range I encounter an error; Run-time error 3706. Couldn’t find the specified provider...
Back
Top Bottom