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.

Exel2003:Commandbutton und Openfile mit Routine

Empfohlene Antworten

Hi @ all

ich hätte eine Frage und komme nicht weiter:

ich möchte in einem Exelsheet einen Button anlegen. Das ist ja auch kein Problem. Nur die Programmierung.

Nun wenn ich auf diesen Button drücke soll das "Datei öffnen" Fenster erscheinen und ich kann damit die File auswählen. Auf diese ausgewählte Datei soll dann eine TRIM Routine ablaufen.

Nun hab ich aber keine Ahnung wie das vom Code aussehen soll. Habt ihr soetwas schon einmal gemacht.

Ich poste euch unten die Routine herrein, damit ihr euch vorstellen könnt was passieren soll wenn die File ausgewählt wurde.


Sub trimmakro() 



' trimmakro Macro 


    Cells.Select 

    Range("M5").Activate 

    Selection.Copy 

    Sheets("ort29a").Select 

    Sheets.Add 

    ActiveSheet.Paste 

    Range("A1").Select 

    Application.CutCopyMode = False 

    ActiveCell.FormulaR1C1 = "=TRIM(ort29a!RC)" 

    Selection.AutoFill Destination:=Range("A1:L1"), Type:=xlFillDefault 

    Range("A1:L1").Select 

    Selection.Copy 

    Range("A1:L1635").Select 

    ActiveSheet.Paste 

    Cells.Select 

    Application.CutCopyMode = False 

    Selection.Copy 

    Sheets("ort29a").Select 

    Range("A1").Select 

    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ 

        :=False, Transpose:=False 

    Sheets("Sheet1").Select 

    Application.CutCopyMode = False 

    ActiveWindow.SelectedSheets.Delete 

End Sub 


mfg

AzA

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Konto

Navigation

Suchen

Suchen

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.