Search:

Type: Posts; User: jeremybarker; Keyword(s):

Page 1 of 10 1 2 3 4

Search: Search took 0.02 seconds.

  1. Replies
    19
    Views
    853

    In addition to Mark's suggestion, you could also...

    In addition to Mark's suggestion, you could also use the statement

    Debug.Print strSQL

    to write the variable to the Immediate window and see whether it's actually being truncated (as opposed to...
  2. Does Excel actually run that code or does it fail...

    Does Excel actually run that code or does it fail when you try to compile it?

    That doesn't look like VBA to me - it just looks like a chunk of VB code that's been pasted into Excel and therefore...
  3. Replies
    14
    Views
    423

    Brilliant! Added to my list of Excel tricks :)

    Brilliant!

    Added to my list of Excel tricks :)
  4. Replies
    14
    Views
    423

    Sneaky non-VBA method: Change Excel options to...

    Sneaky non-VBA method:

    Change Excel options to R1C1 addressing
    F5 (Goto) to cell R1C1440
    Change Excel back to A1 addressing
    See which column you're in
  5. How is rs declared? Do you by any chance have a...

    How is rs declared? Do you by any chance have a reference to ADO appearing in your references list above DAO? Try declaring rs as

    Dim rs as DAO.Recordset

    to make it explicit and see if that...
  6. Replies
    11
    Views
    684

    In the Visual Basic editor, click on Tools ->...

    In the Visual Basic editor, click on Tools -> References and see if any references in the list are flagged as MISSING. You may have 'lost' a code library somewhere along the way, or something has got...
  7. Thread: Excel VBA

    by jeremybarker
    Replies
    2
    Views
    248

    Unless I'm much mistaken, you're missing a comma...

    Unless I'm much mistaken, you're missing a comma either after fName or before Quality - all the assignment expressions need to be separated by commas.
  8. Replies
    7
    Views
    1,096

    I've regularly used networked Excel files...

    I've regularly used networked Excel files exceeding 50MB in the past without major problems, so the size itself is not your problem.

    Are there lots of formulas or recalculations going on? Are...
  9. It's not clear what you're trying to do here, or...

    It's not clear what you're trying to do here, or rather, it's not clear what you think you're trying to do!!

    When you use DAO to talk to a database from VBA in Excel (or Word or whatever) you are...
  10. Replies
    1
    Views
    372

    In the VB editor go into Tools, References and...

    In the VB editor go into Tools, References and see if any are marked as MISSING. It sounds like the Microsoft ADO library or something similar may be missing or renamed.
  11. If you put other macros in the same file, do they...

    If you put other macros in the same file, do they run? Do have macro security set to High or to Disable without warning? Do you get any messages at all from Excel?
  12. This is slightly confusing because you've posted...

    This is slightly confusing because you've posted in the Spreadsheets forum, yet you're referring to Word! Do you actually mean Excel 2003 and Excel 2010?

    I'm on an Office 2007 machine at the...
  13. Replies
    2
    Views
    275

    Is this code you've inherited or something you've...

    Is this code you've inherited or something you've tried to write yourself?

    This code is a little mixed up! Declaring FirstName as you have is perfectly OK - it defines a local variable called...
  14. Which version of Excel are you using? I...

    Which version of Excel are you using?

    I believe it's an option in Excel 2010 (and presumably 2013 too), but unfortunately I'm not on my Excel 2010 machine at the moment. For earlier versions of...
  15. Searching for a missing reference is the way to...

    Searching for a missing reference is the way to go here.

    Is your macro stuck in break mode? Click on on the Reset button on the VB Editor toolbar or go into the Run menu and select Reset, then try...
  16. Well as you correctly recognize, you can't really...

    Well as you correctly recognize, you can't really help properly without full details of the configuration and error message(s).

    At the very least, you need to know whether their Access database is...
  17. How very weird! I've just tried this in Excel...

    How very weird!

    I've just tried this in Excel 2007 and get the same. With 3 dots in A1 (...), the function LEN(A1) reports 1.
    And LEFT(A1,1) gives back ... again. Interestingly, CODE(LEFT(A1,1))...
  18. Replies
    8
    Views
    726

    It looks like your drop-down list has had a macro...

    It looks like your drop-down list has had a macro associated with it at some point in time. If you right-click on the control and select Assign Macro from the context menu that appears, is there a...
  19. Replies
    9
    Views
    1,248

    I wouldn't disagree with this per se, but...

    I wouldn't disagree with this per se, but remember if you use this technique to compact the database regularly - Access will not reclaim the space that was used even if you delete the data from the...
  20. According to your Access screenshot, the field is...

    According to your Access screenshot, the field is called Titile, but in the code it is referred to as Title. I assume Title was your intention :)
  21. Replies
    4
    Views
    453

    Alan, just a thought - does the CLEAN function do...

    Alan, just a thought - does the CLEAN function do what you need? (It's supposed to remove ASCII characters 0 to 31 from strings.)
  22. Replies
    3
    Views
    456

    It looks like the contents of a text field called...

    It looks like the contents of a text field called text221. Do you have an object on your report with that name? It's not very meaningful, which suggests it's the default name of a textbox or...
  23. You just want something like for each fld in...

    You just want something like


    for each fld in tdf.Fields
    if UCase(Left(fld.name,2)) = "FY" Then
    fld.Name = "Town"
    exit for
    end if
    next fld
  24. That will crash because your fld variable isn't...

    That will crash because your fld variable isn't pointing to a field when you try to check its name! I think the intention was that you enclose your code in a loop like this:


    For Each fld in...
  25. Hi Steve, I did some playing on Excel 2007 last...

    Hi Steve, I did some playing on Excel 2007 last night and the following code allows some of the desired functionality:



    Sub GFN()
    Dim fd As FileDialog

    Set fd =...
Results 1 to 25 of 230
Page 1 of 10 1 2 3 4