Edit a cells content via a dialog box?

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
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top