Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I would like to be able to have my userform give back the information message if there is already a value in the destination saying - "A2 already has a value! would you like to replace " + x " with " y "?" my code looks like this - Set Rng = shData.Range("I" & Application.Match(CLng (sh.Range("D6")), shData.Range("B:B"), 0)) Rng.Value = sh.Range("D8").Text Thank you for your help |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim Resp as long
....your declares set rng = .... resp = vbyes if rng.value < "" then resp = msgbox("Overwrite " & rng.address(0,0) & ". It contains: " _ & rng.value, buttons:=vbyesno) end if if resp = vbyes then rng.value = sh.Range("D8").Text else msgbox "come back later..." end if Sam wrote: Hi, I would like to be able to have my userform give back the information message if there is already a value in the destination saying - "A2 already has a value! would you like to replace " + x " with " y "?" my code looks like this - Set Rng = shData.Range("I" & Application.Match(CLng (sh.Range("D6")), shData.Range("B:B"), 0)) Rng.Value = sh.Range("D8").Text Thank you for your help -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
To show a messagebox | Excel Discussion (Misc queries) | |||
MessageBox with tick box | Excel Discussion (Misc queries) | |||
Printing messagebox | Excel Discussion (Misc queries) | |||
Working around a messagebox | Excel Programming | |||
another messagebox/form question | Excel Programming |