' Collection of code snippets by Arne Vajhøj 
' (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
Set binf = CreateObject("ADODB.Stream")
binf.Type = 1
binf.Open
binf.LoadFromFile "test.bmp"
binf.Position = 18
w = binf.Read(4)
h = binf.Read(4)
binf.Close
ww = 256 * AscB(MidB(w,2,1)) + AscB(MidB(w,1,1))
hh = 256 * AscB(MidB(h,2,1)) + AscB(MidB(h,1,1))
MsgBox ww & " x " & hh
