Managing Code - Finding what you've written

slinky

Active Member
Joined
Dec 19, 2008
Messages
294
I just wondered what other people do in terms of managing the code they've written? Also to offer out my solution.
You can't remember every line of code and, as we know, there's no point in re-inventing the wheel.

I keep a code dump and write text files of all of the things I've written and think will be handy at some point in the future.

Then I use this VB Script to find things (launched by a keyboard shortcut from the desktop)

Code:
'CodeSearcher
'[C] AWP - 2012
'Searches files within Address string for given search string. 
'output displayed in IE Window with file name and line number

Dim address
dim search
Set objShell = WScript.CreateObject("WScript.Shell")

address = "h:\wp\code.txt"
search = inputbox("What are you searching for?","slinky's codesearcher")
If search = "" then wscript.quit
strcmd = "cmd /C echo Searching for " & Search & " > h:\wp\code.txt"
strcmd1 = "cmd /C findstr /i /N /c:"""& search & """ h:\wp\code_dump\*.* >> h:\wp\code.txt"
objshell.run(strcmd), 1, true
objshell.run(strcmd1), 1, true


set ie = wscript.createobject("InternetExplorer.Application")
With IE
.Left = 100
.Top = 100
.Height = 600
.Width = 1000
.MenuBar = 0
.Toolbar = 0
.StatusBar = 0
.navigate address
.Visible = 1
End With


wscript.quit

In a corporate enviroment where I cant install any management tools, it works nicely for me!

I'd be interested to hear your thoughts/techniques.
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December

Forum statistics

Threads
1,221,409
Messages
6,159,709
Members
451,586
Latest member
khaledshahin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top