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 Farbfelder

Empfohlene Antworten

Veröffentlicht

Hallo Leute

Ich habe ein Porblem. Ich habe eine Spalte (B) in der Daten stehen. Bei der Eingabe werden diese Felder grau markiert:

Dim i As Long

i = Range("A65536").End(xlUp).Row + 1

Worksheets("Tabelle1").Range("b" & i).Interior.Pattern = xlPatternLighthorizont 'Zeile in B einfärben

Worksheets("Tabelle1").Range("b" & i).Interior.ColorIndex = 15

So nun wenn das Programm neugestartet wird, dann sollen die Farbfeldergelöscht werden.

Dann sollen die Farbfelder wieder neu gesetzt werden (mit einschließlich den alten Daten). Es sollen aber nur die Felder markiert werden, die auch einen Inhalt enthalten. Wie mache ich das?

Danke für die Antworten

Hi,,

also, beim Programmstart würde ich eine sub "Farben löschen" aufrufen, die die Farbe aller Felder auf weiß setzt. Dann eine sub "Datenfelder Färben", wo du mit einer Schleife die einzelnen

Felder durchgehst und mit If abfragst, ob Sie gefüllt sind, wenn Ja, dann einfärben wenn nicht, dann weiter...

Hilft das weiter???

Gruß, Tiana

Ich hab es schon gelöst Danke!

Private Sub UserForm_Activate()

Rows("4:65536").Select

Selection.Interior.ColorIndex = xlNone

Range("a4").Select

Application.ScreenUpdating = False

For Each zelle In Range("b:b")

If zelle <> "" Then zelle.Interior.ColorIndex = 15

Next zelle

Application.ScreenUpdating = True

End Sub

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.