Recent content by essaytee

  1. essaytee

    [SOLVED] VBA - Excel - how to extract the default font color

    Using ChatGPT I came across this solution. I haven't tried it yet but I assume it would do the trick. Dim defaultColor As Long defaultColor = ActiveWorkbook.Styles("Normal").Font.Color MsgBox "Default Font Color: " & defaultColor
  2. essaytee

    [SOLVED] VBA - Excel - how to extract the default font color

    Thanks, simple, why didn't I think of that.
  3. essaytee

    [SOLVED] VBA - Excel - how to extract the default font color

    Thanks all for the responses. As usual, I overthink things. My executive decision is to simply refer to Black as my default colour, which it is anyway. I am the one creating the spreadsheet and then distributing it. It's not the case of me tinkering with somebody else's spreadsheet.
  4. essaytee

    [SOLVED] VBA - Excel - how to extract the default font color

    In Access VBA when creating Excel spreadsheets, how do I extract the default font color? I have a routine where I cycle through a recordset and one particular field has one of three possible values, a positive number, zero or negative number, that are text fields, not numbers. (It's a...
  5. essaytee

    Why messagebox appears then closes on successful run of DoCmd.OutputTo....pdf

    Everything works, the report is saved correctly, so wasn't worried about any logic. With the messagebox appearing it did raise a doubt that something might not be right. So, if that is the case, I can remove the Application.Echo commands.
  6. essaytee

    Why messagebox appears then closes on successful run of DoCmd.OutputTo....pdf

    I am successfully printing a report directly to pdf via the command, DoCmd.OutputTo acOutputReport, strReport, acFormatPDF, strFile, False Everytime I run the code there is a messagebox that appears and instantly disappears, though I can't read the contents of the messagebox. This happens...
  7. essaytee

    Is it possible: Query/SQL to dynamically display a record/order/position number, without underlying field from a table

    I'm still having the same issue that the first record is being accessed twice, according to my debug window. For my particular purposes I don't require a where clause filter, but if employing this method, I'd have to first run the function to reset it back to zero and then call the query. At...
  8. essaytee

    Is it possible: Query/SQL to dynamically display a record/order/position number, without underlying field from a table

    Thanks for that, yes, now I can replace my counting variable for record number with the .AbsolutePosition + 1 property.
  9. essaytee

    Is it possible: Query/SQL to dynamically display a record/order/position number, without underlying field from a table

    I modified the argument list to set v = null, as follows: Function rownum(Optional v As Variant = Null) As Long Static r As Long If IsNull(v) Then r = 0 Else r = r + 1 Debug.Print "v = " & v & " --- and --- r = " & Str(r) End If rownum = r End...
  10. essaytee

    Is it possible: Query/SQL to dynamically display a record/order/position number, without underlying field from a table

    I'm returning to some Access data manipulation and I've come across a situation I thought was possible, but can't figure it out. I have adopted a work-around (explained at the end), but I thought there is a less-convoluted way. I have a table that records running times of runners for each...
  11. essaytee

    [SOLVED] Calculated column not sorting by largest to smallest

    Update: Well, don't I feel like a complete dill. I applied the largest to smallest sort on the affected columns and the same result, rows disappear. I scrolled down many, many rows and there were the other rows, in largest to smallest order.
  12. essaytee

    [SOLVED] Calculated column not sorting by largest to smallest

    I've created a spreadsheet that records my club's weekly run data for each member. The data is extracted from Strava, bit of a process, screenshot taken, then converted to PDF, then OCR'd and then to Excel (temporary sheet to iron out any OCR hiccups) then copied to the final Excel data file...
  13. essaytee

    How to validate 'time' value from Excel spreadsheet

    Ok, I've coded in the formatting and validation components of the spreadsheet, but I fear that that was all in vain as regards my project, not so from a learning perspective. The spreadsheet that Access provides is a template, as mentioned previously, users will butcher other spreadsheets to...
  14. essaytee

    How to validate 'time' value from Excel spreadsheet

    I've now added data validation and below is a sample snippet in relation to dates, just to see if it worked, which it does. The data validation is applied to the entire column, which includes the first row, which is the header row. Is there a way to apply the validation but to ignore the...
Back
Top Bottom