Eggs Benny

Eggs benny
Knorr hollindaise sauce as per package. In the last thickening phase, add a tsp of dill

Toast a cheese English muffin 
Butter it fresh out of toaster 
Cut a circle of classic ham 3/16″ thick and pan fry it. 
Smear cream cheese on the heated ham 
Add a poached egg (use egg container to cut ham)
Pour hollindaise over the tower of yummy 

Working with a month’s data

This subroutine will increment a month in a provided cell.

Sub AddMonth()
Dim sDate As String, dDate As Date

setUp

Sheets("Month").Select
Range("A3").Select
If IsNull(Sheets("Month").Range("A3").Select) Or Sheets("Month").Range("A3").Value = "" Then
Selection.End(xlToRight).Select
End If
sDate = ActiveCell.Value
dDate = CDate(sDate)

If Day(dDate) 1 Then
dDate = DateAdd("D", -Day(dDate) + 1, dDate)
End If
dDate = DateAdd("M", 1, dDate)
Sheets("Month").Range("G1:H1").Value = Format(dDate, "mmmm-yyyy")
fillMonth dDate

closeOut
End Sub

Then you can update a given month

Sub UpdateMonth()
Dim sDate As String, dDate As Date
setUp
Sheets("Month").Select
Range("A3").Select
If IsNull(Range("A3").Select) Or Range("A3").Value = "" Then
Selection.End(xlToRight).Select
End If
sDate = Sheets("Month").Range("G1").Value
dDate = CDate(sDate)

fillMonth dDate
closeOut
End Sub

Or decrement a month

Sub SubMonth()
setUp
Dim sDate As String, dDate As Date

Sheets("Month").Select
Range("A3").Select
If IsNull(Range("A3").Select) Or Range("A3").Value = "" Then
Selection.End(xlToRight).Select
End If
sDate = ActiveCell.Value
dDate = CDate(sDate)

If Day(dDate) 1 Then
dDate = DateAdd("D", -Day(dDate) + 1, dDate)
End If
dDate = DateAdd("M", -1, dDate)
Range("G1:H1").Value = Format(dDate, "mmmm-yyyy")
fillMonth dDate
closeOut
End Sub

Is it a number?

Sometimes you’re working with a large amount of data, and you only want the numbers to be added to a total. This function will convert all non numbers to 0 and add it to the total you pass in.
 

Function convertHours(sHours As String, dHours As Double) As String
If dHours = 0 Then
sHours = "0"
Else
If Not IsNumeric(sHours) Then
sHours = "0"
End If
End If
convertHours = sHours
End Function

Hiding Actions

Sometimes you want to hide what you’re processing in VBA from the user. This code will help – call the SetUp module before your other code and CloseOut when you’re done.


Sub setUp()

‘Get current state of various Excel settings; put this at the beginning of your code
screenUpdateState = Application.ScreenUpdating
statusBarState = Application.DisplayStatusBar
calcState = Application.Calculation
eventsState = Application.EnableEvents
displayPageBreakState = ActiveSheet.DisplayPageBreaks ‘note this is a sheet-level setting

‘turn off some Excel functionality so your code runs faster
Application.ScreenUpdating = False
Application.DisplayStatusBar = False
‘Application.Calculation = xlCalculationManual
Application.Calculation = xlCalculationAutomatic

Application.EnableEvents = False
ActiveSheet.DisplayPageBreaks = False ‘note this is a sheet-level setting

End Sub

… 


Sub closeOut()
'end your code

‘after your code runs, restore state; put this at the end of your code
Application.ScreenUpdating = screenUpdateState
Application.DisplayStatusBar = statusBarState
Application.Calculation = xlCalculationAutomatic
Application.EnableEvents = eventsState
ActiveSheet.DisplayPageBreaks = displayPageBreaksState ‘note this is a sheet-level setting
End Sub

 

You’re so fat, have perogies 

The fat part is in the sauce here. 

Cut some bacon into about 1″ pieces and fry until it’s the way you like it. Drain what you can of the grease and put bacon aside. 

Start water boiling for perogies. 

Add about 1/2 an onion diced and a heaping tablespoon of butter with some garlic salt or powder back into your frying pan. 

Cook until onions are clear. 

Pour 1/2 can sweetened condensed milk and 1/2 can evaporated milk into pan. 

Add bacon back in and cook for about 5 min until it’s all combined. 

Also works good with some sausage cooked in sliced with the bacon. 

Get files in a folder

Sometimes you needfo work with external files, this code will let you pick a folder.

Select Root folderSet fd = Application.FileDialog(msoFileDialogFolderPicker)

With fd

.Title = "Select a folder to compile"

.AllowMultiSelect = False

.InitialFileName = strRootPath

If .Show = -1 Then

For Each varRootFolder In .SelectedItems

strRootPath = varRootFolder & "\"

Next varRootFolder

Else

End If

End With

Set fd = Nothing

Puffy paint art

Pinterest is full of puffy paint recipes. I twisted this a bit since my oldest is still a bit young to not eat paint. 

In a bowl mix equalish parts cheap shaving foam and white glue (dollar store be my friend) 

Then smear in random piles this on card stock and let dry on a flat surface for a day or two. 

Turns out somewhat like a topography map. 

Then give to toddler with their favorite non toxic paint and a brush or sponge.