Windows 10: Question about VBA CODE not working good

Discus and support Question about VBA CODE not working good in Windows 10 Software and Apps to solve the problem; hi guys, do not know if there are VBA specialists on the board, but I pop the question: since recently when I save a docu automatically, like... Discussion in 'Windows 10 Software and Apps' started by jeffrys, Oct 19, 2014.

  1. jeffrys Win User

    Question about VBA CODE not working good


    hi guys,

    do not know if there are VBA specialists on the board, but I pop the question:

    since recently when I save a docu automatically, like 199-invoice I get:

    blanc 199-invoice, instead of the same without the blanc position in front. Sorting the invoice at the back, since sort happens decending.

    When I remove the blanc in front the sort happens correctly, but when I rename the invoice to 199-invoic (not altering the blanc position) all of a sudden the sort is ok as well.

    Very strange.

    In order to remove all macro's and codes to get a blanc document I use:

    ActiveSheet.Copy
    With ActiveSheet.UsedRange
    .Copy
    .PasteSpecial xlValues
    .PasteSpecial xlFormats
    End With

    This happens before the save and my guess is that the problem lies there.


    any ideas are welcome

    thanks

    jeff

    :)
     
    jeffrys, Oct 19, 2014
    #1

  2. DDE link in Excel crash when I open VBA in Excel wirh Windows10

    Good Morning.

    I,ve installed windows 10 about 20 days ago.

    I've also Microsoft Excel 2007 and I use much VBA Excel and DDE links in my worksheets in Excel.

    Before installing Windows 10 I use Windows XP ( with the same Excel 2007 thet I reinstall on Windows 10)

    With Windows XP, some times when I need to change istructions in VBA, also if my worksheets was linked with DDE, I opened VBA VisualBasic and I can work in my VBA application.

    No problems.

    Now, with windows 10, when I open in Excel Visual Basic java links DDE Excel crash.

    All works well ( DDE, Excel, and other software ) but whan I open visualbasic in Excel Java Crash.

    Any suggest?

    Thanks
     
    GiovanniSmiraglia, Oct 19, 2014
    #2
  3. Software and VBA Compatibility

    I develop a lot of macros and code in VBA for Access and Excel on my PC. I'm also a big R user, and want to get MatLab at some point too.

    So, my question is, would upgrading to Windows 10 affect:

    VBA editor, object models, dlls, etc

    R and the RExcel add-in

    MatLab

    Excel and Access themselves

    My hunch is "no" but I need to make sure.
     
    JoshuActiveX, Oct 19, 2014
    #3
  4. Superfly Win User

    Question about VBA CODE not working good

    I'm no VBA specialist but seems it's a formatting issue - if what you mean by "blanc" is a leading space?
    In normal code Trim remove those, but in VBA I suppose one of the constants does that - maybe try ..

    .PasteSpecial Paste:=xlPasteValues

    Not sure why removing he last char has a different output to the sort function though...
     
    Superfly, Oct 19, 2014
    #4
  5. jeffrys Win User
    hi Superfly,

    will try that ASAP and post back here.

    thanks

    Jeff
     
    jeffrys, Oct 19, 2014
    #5
  6. jeffrys Win User
    well Superfly,

    no difference, do not know what to do with it.

    result just the same, when renaming it to whatever, the space in the first position is gone then.

    but thanks


    jeff
     
    jeffrys, Oct 19, 2014
    #6
  7. Superfly Win User
    OK PM me the Excel file if you would like me to have a look at how the code hangs together.

    It's a bit off topic here so I may reply via PM instead.
     
    Superfly, Oct 19, 2014
    #7
  8. jeffrys Win User

    Question about VBA CODE not working good

    ok, S will do that

    thanks

    Jef
     
    jeffrys, Oct 19, 2014
    #8
  9. Superfly Win User
    Jeff, I have replied to your post with what I think is the solution ... it's a common mistake made when concatenating strings to form a file path.

    Hope it works.
     
    Superfly, Oct 19, 2014
    #9
  10. jeffrys Win User
    ok S

    will check this

    thanks

    Jeff
     
    jeffrys, Oct 19, 2014
    #10
  11. jeffrys Win User
    ok Superfly,

    you where right and it works. Thanks for your help, you saved my week....


    Jeff
     
    jeffrys, Oct 19, 2014
    #11
  12. Superfly Win User
    You're welcome - happy to be of assistance *Smile
     
    Superfly, Apr 5, 2018
    #12
Thema:

Question about VBA CODE not working good

Loading...
  1. Question about VBA CODE not working good - Similar Threads - Question VBA CODE

  2. Question about suitable code editor for i3

    in Windows 10 Gaming
    Question about suitable code editor for i3: Currently I have an i3 PC, 8 GB of RAM and 500s SSD, ×64 based OS, I'm asking for an advice about the code editor which is lightweight with text highlight at least effects that I can install install... This is basically because I want to continue learning JavaScript. Thank...
  3. Question about suitable code editor for i3

    in Windows 10 Software and Apps
    Question about suitable code editor for i3: Currently I have an i3 PC, 8 GB of RAM and 500s SSD, ×64 based OS, I'm asking for an advice about the code editor which is lightweight with text highlight at least effects that I can install install... This is basically because I want to continue learning JavaScript. Thank...
  4. Question about how anti-viruses works

    in Windows 10 Gaming
    Question about how anti-viruses works: Hello, I got this question and there was a similar question from another user but sadly I can't find it.Example I had malware, and I also had Windows Security and Malwarebytes.Can the Malware use the anti-viruses to hide itself? Like basically infecting the anti-virus and...
  5. Question about how anti-viruses works

    in Windows 10 Software and Apps
    Question about how anti-viruses works: Hello, I got this question and there was a similar question from another user but sadly I can't find it.Example I had malware, and I also had Windows Security and Malwarebytes.Can the Malware use the anti-viruses to hide itself? Like basically infecting the anti-virus and...
  6. Question about Lockscreen Slideshow not working

    in Windows 10 Customization
    Question about Lockscreen Slideshow not working: Hi everyone, I've never had the issue before, but I've discovered in the past week, when my computer goes into the lock screen, it was just using a single picture my sign in screen picture instead of the rotating slideshow I had set up. This was working in the past, but for...
  7. Excel VBA Coding Window Horizontal scrollbar

    in Microsoft Office and 365
    Excel VBA Coding Window Horizontal scrollbar: Hello All, I hope everyone is keeping well and safe!! Within the Excel VBA coding window I am unable to horizontally scroll at all, using either, my laptops touchpad (two finger gesture) or a seperate mouse wheel. It's actility pretty frustrating. I am able to press and...
  8. VBA Question

    in Microsoft Office and 365
    VBA Question: Hi all, I am attempting to teach myself VBA in Excel and I am asking is it possible to invoke a macro depending on the contents of a cell? please. Len 129175
  9. VBA code

    in Windows 10 Customization
    VBA code: I have been working on program in VBA code. I have been able to access with alt F11. Now I am unable to view my code. https://answers.microsoft.com/en-us/windows/forum/windows_10-other_settings/vba-code/e9ef2778-957d-4354-8346-458793521d8b
  10. VBA Code returns NAME? ERROR

    in Windows 10 BSOD Crashes and Debugging
    VBA Code returns NAME? ERROR: I have tried 3 different VBA codes for counting cells by color and keep getting NAME? https://answers.microsoft.com/en-us/windows/forum/windows_10-performance/vba-code-returns-name-error/14f9bb69-dfed-420a-9781-f4dff490e06e