Hi,


I'm doing a meeting room booking sheet that would be put to our shared network drive at work.

The layout would be like calendar and it would have one macro button. By pressing the button an input box or something similiar would open where you would put the date and start/end times of your meeting. Then by pressing OK it would merge the cells and colour them and put the name of the user on it.

Book.JPG

I got it working in a way that you have the selection marked and then by pressing the button your username is inserted. That is where my knownledge ends.

So how would I get a selection I want from inputbox given date and time?

Here is my recorded VBA:

Sub Varaus()
'
' Booking Macro
'

'

Selection.Merge
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorAccent1
.TintAndShade = 0
.PatternTintAndShade = 0
End With
ActiveCell.FormulaR1C1 = Application.UserName
ActiveCell.Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.WrapText = False
.Orientation = 90
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = True
.ReadingOrder = xlContext
.MergeCells = True
End With
End Sub