Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

vba zeile aus excel in textdatei

Empfohlene Antworten

hi,

vorab bin vba neuling....

ich möchte den inhalt einer kompletten zeile (a1 - a9) in eine textdatei schreiben. leider schaffe ich es nicht den inhalt der zellen a1 bis a9 in eine variable zu stecken....

bisher habe ich es nur geschaft mit folgendem code eine textdatei zu erstellen und "irgendwas" reinzuschreiben.

Sub export()

'Abfrage des Filenamen

Textfile = Application.InputBox("Bitte gewünschten Filenamen in folgendem Format eingeben: c:\test\test.txt")

'Anlegen der Textdatei

Set fs = CreateObject("Scripting.FileSystemObject")

Set a = fs.CreateTextFile(Textfile, True)

'in Textdatei schreiben

a.WriteLine ("test")

'Textdatei schließen

a.Close

End Sub

wie bekomme ich jetzt am geschikctesten den inhalt der zellen a1 bis a9 in die textdatei?

danke schonmal vorab

dim das as string

das = tabelle1.cells(1,1)

das = das & tabelle1.cells(1,2)

das = das & tabelle1.cells(1,3)

...

wenn du dann den dreh mit schleifen raus hast kannst du die spalte durch eine variable ersetzen ;)

bzw. könnte man auch den ganzen bereich mit dem Range ding machen, das mag ich aber nich so sehr... :rolleyes::D

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.