Search:

Type: Posts; User: el84

Page 1 of 13 1 2 3 4

Search: Search took 0.06 seconds.

  1. [RESOLVED] Previously working program now giving run time error

    I have a program that has worked for monthly for months, but now it is giving runtime error. Is this the result of a W10 update some time in the last month?

    RESOLVED! Trying to FileCopy open file!...
  2. Replies
    17
    Views
    1,757

    Re: Word Automation again

    Assuming that my code is OK, I'll mark this resolved. Thanks to all who helped.
  3. Replies
    17
    Views
    1,757

    Re: Word Automation again

    I'll mark this resolved shortly unless an expert (ie most VB6 people except me) warns me that I'm in a fool's paradise.
  4. Replies
    17
    Views
    1,757

    Re: Word Automation again

    Thanks OptionBase! What a silly mistake! That fixes that error.
    I now have to worry about this one
    I know it's probably partly because I haven't saved the pdf, but I believe the syntax is...
  5. Replies
    17
    Views
    1,757

    Re: Word Automation again

    I'll post rather than zip, for your convenience. Everything works except as commented


    ' WordTry -- automating MS Word (and PDF)
    ' start with early binding to get Intellisense and then change to...
  6. Replies
    17
    Views
    1,757

    Re: Word Automation again

    In case anyone is interested. should I post the whole app?
  7. Replies
    17
    Views
    1,757

    Re: Word Automation again

    Hello Sam. Earlier in the program I'm using
    If optDocx = True Then ' default ('value' starts at True)
    wrdDoc.SaveAs aFileName
    wrdDoc.Close
  8. Replies
    17
    Views
    1,757

    Re: Word Automation again

    Phill, I have rearranged the code per your post at #7.
    Unfortunately I get 'Variable not defined' against the line 'WrdApp.Qui't, and if I comment that line out I get the same error with 'Set WrdApp...
  9. Replies
    17
    Views
    1,757

    Re: Word Automation again

    :):):):) Sam! And thanks Phill
  10. Replies
    17
    Views
    1,757

    Re: Word Automation again

    What order should I use?
  11. Replies
    17
    Views
    1,757

    Re: Word Automation again

    Thanks. I'll try Phil's idea. Problem I was having was 'variable not defined'. It is not a variable as I set it elsewhere but obviously I'm doing things in the wrong order. (Ultimate in confusion is...
  12. Replies
    17
    Views
    1,757

    [RESOLVED] Word Automation again

    Thanks Schmidt for your help last time!
    I am having problems with the last piece of code. Here are relevant fragments.
    What am I doing wrong? (readers: please resist temptation!)


    Dim wrdDoc As...
  13. Replies
    6
    Views
    707

    Re: Word Automation

    Got it!


    ' Document title on first line
    Set titleRange = wrdDoc.Paragraphs.First.Range
    With titleRange
    .Text = aTitle
    .Bold = False
    .Underline =...
  14. Replies
    6
    Views
    707

    Re: Word Automation

    Thanks very much for continuing with me so patiently!
    That's got rid of the error 438.
    The problem now is that the title is not appearing on the word document.
    The content is appearing and the...
  15. Replies
    6
    Views
    707

    Re: Word Automation

    Unfortunately 'Run-time error '438': Object doesn't support this property or method.'
  16. Replies
    6
    Views
    707

    [RESOLVED] Word Automation

    Can anyone spot the reason why this fragment of code produces a document with either the title showing and the rest of the content missed or vice versa?


    Set wrdDoc = wrdApp.Documents.Add

    ...
  17. Replies
    23
    Views
    2,462

    Re: Roundup and roundown for specific decimals

    You are right, of course...
  18. Replies
    23
    Views
    2,462

    Re: Roundup and roundown for specific decimals

    ChatGPT offers this function


    Function CustomRound(ByVal value As Double) As Long
    Dim integerPart As Long
    Dim decimalPart As Double

    integerPart = Int(value)
    decimalPart...
  19. Re: VB6 Question: Is the VB6 IDE a little more flaky in Windows 10 +?

    I am finding the IDE quite stable under W10. The only thing I notice is that when placing controls on a form, the outlines do not show up as they previously did.
  20. Replies
    1
    Views
    1,331

    Re: [RESOLVED] Excel automation borders on a cell

    This was resolved in the Vb6 and earlier board.
  21. Replies
    5
    Views
    792

    Re: [RESOLVED] IDE editing quirk

    Very subtle. Well spotted. Even I understood that explanation!
  22. Re: [RESOLVED] Excel Automation Late Binding border question

    Just in case anyone looks at this thread now, I omitted to include the line "Set excel.App = Nothing" in the EXIT sub.
  23. Re: Excel Automation Late Binding border question

    OptionBase 1 and Sam: I was very moved by your health stories.
    22 years ago I was suffering from CPM and would probably die in ICU after 3 weeks
    But I wasn't ready!
    Long story short: after about 3...
  24. Re: Excel Automation Late Binding border question

    Thanks. Meanwhile, starting from post #25 as I always want thickness 3, instead of putting it in constants, I have hardcoded it. This is what I get, and it works.


    Private Sub...
  25. Re: Excel Automation Late Binding border question

    Sam: My previous GP has Parkinsons. Drs claim that a complete cure is round the corner. Here's hoping!
    OptionBase1: I've tried your code in #25. SUCCESS. Many thanks
    How would I increase the weight...
  26. Re: Excel Automation Late Binding border question

    Hope all is OK Sam. I didn't think it sounded like you.
  27. Re: Excel Automation Late Binding border question

    Well Sam
    I am very sad you feel that way, as you have been very kind and helpful in past years. I have indeed tried everything suggested except the one from Elroy (too complicated for my tiny mind)....
  28. Re: Excel Automation Late Binding border question

    Thanks for that. But what I want to do is produce an EdgeBottom or EdgeTop position.
  29. Re: Excel Automation Late Binding border question

    Thanks. And yes, that would be the logical procedure, and I did try it, but without success. The problem appears to be that while all the other properties I have tried specifying do not need the...
  30. Re: Excel Automation Late Binding border question

    Yes. I could doubtless compress that!
  31. Re: Excel Automation Late Binding border question

    ' ExcelTry

    ' Project > References > Microsoft Scripting Runtime
    ' Project > Components > Microsoft Windows Common Controls 6 (SP4) and...
    ' ...Microsoft Windows Common Controls-2 6 (SP6)

    '...
  32. Re: Excel Automation Late Binding border question

    [QUOTE=SamOscarBrown;5613575]Yeah...I have no idea what the rest of his code is BECAUSE HE WON'T POST IT as asked!!!

    and by the way, re "But this line: excelApp.Range(aRange).Borders.Weight = 4
    ...
  33. Re: Excel Automation Late Binding border question

    The problem is not on that line, Sam. It's at the end of the first line, and I'm pretty sure it's to do with setting up oSheet(1), this being late binding. I did not need oSheet for any of my other...
  34. Re: Excel Automation Late Binding border question

    [QUOTE=SamOscarBrown;5613440]This EXAMPLE comes from one of my small programs...draws a border completely around cell C3:
    (Is this what you are looking for?)

    Thanks Sam. I've tried fitting this...
  35. Replies
    1
    Views
    1,331

    [RESOLVED] Excel automation borders on a cell

    This is a copy of my post in VB6. I am looking for a VB6 solution
    Using late binding I have a subroutine to set the font aSize of cell aRange on a sheet named aFile, thus

    Code:

    Private Sub...
  36. Re: Excel Automation Late Binding border question

    Sorry fellows! My post #1 did not work anyway, so that was a bad start.
    So 2 and 3 failed no doubt because of that
    4 much too complex for me (sorry Elroy)
    Perhaps I should start with what does...
  37. [RESOLVED] Excel Automation Late Binding border question

    Given that to place a border to the top of an Excel cell, you use eg ...
    Range("a4").Borders(xlEdgeTop) what is the equivalent if you wish to place a border right around the cell?

    #####EDIT: THIS...
  38. Re: Simple Vb6 Code to list files in a given folder

    You are right. Not being able to clearly explain what is wanted is a symptom of ignorance!
  39. Re: Simple Vb6 Code to list files in a given folder

    I finally got myself together. Basically this was all I needed


    aPath = "C:\Users\Alan\Documents\Budgets\"

    Private Sub cmdCREATE_Click()

    ' build previous and next filename and...
  40. Re: Simple Vb6 Code to list files in a given folder

    Sam! I most humbly apologise! I cannot successfully fit the zip file into my vb6 arrangements.
    You have obviously gone to a lot of trouble here for me.
    Just show me the code for the first...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Click Here to Expand Forum to Full Width