+ Reply to Thread
Results 1 to 4 of 4

Zahlen mit 0 am Anfang werden nicht korrekt vom Excel ins Word übernommen

  1. #1
    Registered User
    Join Date
    01-02-2022
    Location
    Switzerland
    MS-Off Ver
    Office Professional Plus 2021
    Posts
    2

    Zahlen mit 0 am Anfang werden nicht korrekt vom Excel ins Word übernommen

    Hallo
    Ich habe eine Excel-Liste aus der ich mit einem Makro diverse Zahlen in eine Word-Datei kopiere und dann so per Mail versende.
    Mit folgendem Befehl kopiere ich die jeweilige Artikelnummer aus dem Excel ins Word

    doc.Bookmarks("Item").Range.Text = AbnahmenHilti.Cells(Zeile, 5).Value

    Soweit so gut, das Makro funktioniert einwandfrei, aber ich habe noch einen kleinen Schönheitsfehler.
    Die Artikelnummer besteht immer aus 7 Zahlen die teilweise mit 0 oder auch 00 beginnen.
    Bei diesen Zahlen werden mir die 0 Werte nicht ins Word transferiert.

    Ich könnte die Zahl als Text umformatieren, dann würde es funktionieren, aber da ich per s-Verweis Bezeichnungen zu den Artikelnummer rausziehe und in dieser Liste ebenfalls alles als Zahl hinterlegt ist, würde ich das gerne vermeiden.
    Gibt es eine andere Lösung, die Artikelnummer immer 7-stellig ins Word zu übernehmen.
    Ich bin ein VBA Neuling, daher bitte ich um Nachsicht. Bin schon total happy dass der Rest, so gut klappt.
    Besten Dank schon mal.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,302

    Re: Zahlen mit 0 am Anfang werden nicht korrekt vom Excel ins Word übernommen

    Try:
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    01-02-2022
    Location
    Switzerland
    MS-Off Ver
    Office Professional Plus 2021
    Posts
    2

    Re: Zahlen mit 0 am Anfang werden nicht korrekt vom Excel ins Word übernommen

    Great, thanks a lot!

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,302

    Re: Zahlen mit 0 am Anfang werden nicht korrekt vom Excel ins Word übernommen

    You're welcome.



    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Excel schreibt nicht die richtigen Zahlen
    By Cuevas13 in forum Non English Excel
    Replies: 3
    Last Post: 10-28-2019, 01:45 PM
  2. Excel schreibt nicht die richtigen Zahlen
    By Cuevas13 in forum Excel General
    Replies: 0
    Last Post: 10-28-2019, 05:51 AM
  3. Zellen sollen nach eingabe und schließen gesperrt werden
    By t.r.i.b.a.l in forum Non English Excel
    Replies: 10
    Last Post: 01-25-2015, 06:42 PM
  4. Zellen sollen nach eingabe und schließen gesperrt werden
    By t.r.i.b.a.l in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-20-2015, 12:55 AM
  5. Zellen sollen nach eingabe und schließen gesperrt werden
    By t.r.i.b.a.l in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-19-2015, 12:56 PM
  6. Worksheet_Change funktioniert nicht
    By toburz in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-20-2005, 01:00 PM
  7. [SOLVED] Nicht normal
    By Magda in forum Excel - New Users/Basics
    Replies: 0
    Last Post: 05-30-2005, 10:05 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1