Edit a cells content via a dialog box?

  • Thread starter Thread starter Wazza McG
  • Start date Start date
W

Wazza McG

Hi,

I would like to edit a cells content via a dialog box or message box.
The reason for this request is because I have a need to update a date
and machinary part in a maintenance log. I have used input boxes and
message boxes in the past, however, editting a known cells contents
without actually going to that cell on the sheet is really what I am
after.

Thanks in advance.

Regards,

Wazza McG
 
Hi Wazza,

dim strDate as string
'set default date
strDate =date()
do
strDate=inputbox("enter date","maintenance date",strdate)
'check whether cancelled
if len(strDate)<1 then
'user clicked cancel
end if
'loop if user entered a non date value
loop until isdate(strDate)
'store date in cell
Worksheets("name of sheet").range("E2")=strDate

' E2 could also be name of named cell

hope this gives you some ideas to work with

Luck
Jonathan
 
Back
Top