Yahoo Clever wird am 4. Mai 2021 (Eastern Time, Zeitzone US-Ostküste) eingestellt. Ab dem 20. April 2021 (Eastern Time) ist die Website von Yahoo Clever nur noch im reinen Lesemodus verfügbar. Andere Yahoo Produkte oder Dienste oder Ihr Yahoo Account sind von diesen Änderungen nicht betroffen. Auf dieser Hilfeseite finden Sie weitere Informationen zur Einstellung von Yahoo Clever und dazu, wie Sie Ihre Daten herunterladen.
What is a macro and how do I create one?
I'm doing an assignment that requires me to create a macro in excel (I'm using the latest version of excel, whatever that is). I've been told to use visual basic editor, but I have absolutely no clue what a macro is or how to use VBA. Microsoft help is of no use!
1 Antwort
- garbo7441Lv 7vor 1 JahrzehntBeste Antwort
Okay, try this simple exercise.
Open a new workbook.
Press ALT + F11
Insert > Module (Top of the screen)
In the module space to the right enter these macro examples:
Sub DisplayCurrentTime ( )
msgbox Time()
End Sub
Sub SetAValue ( )
Activesheet.Range("A1").Value = 624
End Sub
Close back to Excel.
Go to Tools > Macro > Macros
Highlight one of the macros.
Click 'Run'
Repeat the process and run the other macro.
This is basically how macros are created and function. They can be very simple, like these, or contain literally hundreds of lines of code
You can also use the Macro Recorder built into Excel.
Go to Tools > Macro > Macros
Click: Record New Macro
Then perform some actions, like changing the color of a cell, or entering text into several cells.
When you have done a couple of things, go back to Tools > Macro > Macros and click 'Stop Recording' (VERY IMPORTANT).
Then, manually reverse all the things you did while recording. Go back to Tools > Macro > Macros and select your macro and run it.