PDA

View Full Version : add a description



lior03
01-09-2007, 12:54 AM
hello
i got the idea from my vba mentor johnske
i want to turn his macro

Sub AddFunctionDescription()
Application.MacroOptions _
Macro:="Test", _
Description:="This is a test"
End Sub

to a general way to add a macro description programatticlly

Sub addinn()
Dim x As String
Dim y As String
x = Application.Dialogs(xlDialogRun).Show
y = InputBox("please enter macro description")
Application.MacroOptions _
macro:="x", Description:="y"
End Sub


how do i can do it automatically
thanks

lior03
01-09-2007, 06:40 AM
hello
if you have a list of your macros .you can use


Sub addmediscription()
Dim x As String
Dim y As String
y = InputBox("please enter macro description:")
If y = Empty Then Exit Sub
x = Application.InputBox("select a macro", Type:=8)
Application.MacroOptions _
macro:=x, Description:=y
End Sub

lior03
02-26-2007, 03:01 AM
hello
i want to clear all description from all my macros.how can i tell excel to count all vba projects and then clear the description. maybe:
Sub clearmacrodescription()
Dim x As String
x = Application.InputBox("select a macro", Type:=8)
Application.MacroOptions _
macro:=x, Description:=""
End Sub
i don't to do it throug a list but automaticlly.
thanks