Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Form writing blanks!

I have a form and it keeps on overwriting values with
blanks if nothing is entered.

I would like to stop this if the textbox on the form is
blank then do not try to write anything at all whether
destination cell is blank or already has a value.

Also if there is some information already there is it
possible to get a message box for each textbox stating "A
already has a value! would you like to replace x with y?"

This would be great if I can. Anyone know how?

Thank you!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Form writing blanks!

Why not add a If function saying that if the textbox is empty then do
nothing and if it contains something overwrite?
I would add something along the lines of
message = "A already has a value! would you like to replace " + x " with "
y "?"
then
msgbox message.

Hope this helps
Michael

"Form problem!" wrote in message
...
I have a form and it keeps on overwriting values with
blanks if nothing is entered.

I would like to stop this if the textbox on the form is
blank then do not try to write anything at all whether
destination cell is blank or already has a value.

Also if there is some information already there is it
possible to get a message box for each textbox stating "A
already has a value! would you like to replace x with y?"

This would be great if I can. Anyone know how?

Thank you!



  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Form writing blanks!

I have been writing my code like this -

Set Rng = shData.Range("I" & Application.Match(CLng
(sh.Range("D6")), shData.Range("B:B"), 0))
Rng.Value = sh.Range("D8").Text

but now have tried it like this as you said to but it
gives me an error.

If sh.Range("D8") Is Null Then
End
Else
Set Rng = shData.Range("E" & Application.Match(CLng
(sh.Range("D6")), shData.Range("B:B"), 0))
Rng.Value = sh.Range("D8").Text
End If

What do I need to add? And how do you set up a msgbox
replace x with y.

Thanks


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Form writing blanks!


wrote in message
...
I have been writing my code like this -

Set Rng = shData.Range("I" & Application.Match(CLng
(sh.Range("D6")), shData.Range("B:B"), 0))
Rng.Value = sh.Range("D8").Text

but now have tried it like this as you said to but it
gives me an error.

If sh.Range("D8") Is Null Then
End
Else
Set Rng = shData.Range("E" & Application.Match(CLng
(sh.Range("D6")), shData.Range("B:B"), 0))
Rng.Value = sh.Range("D8").Text
End If

What do I need to add? And how do you set up a msgbox
replace x with y.

Thanks


Hi, i'm only a noob, ask one of these boffins :-)


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do I create a locked form to fill in the blanks bill Excel Discussion (Misc queries) 1 November 2nd 08 05:06 AM
Writing a story in Excel with fill in blanks that reference pictur Sagit Excel Discussion (Misc queries) 6 October 3rd 08 04:26 AM
Fill in Blanks for 1099-Div Summary Form, Office 2003 RSMITH Excel Worksheet Functions 0 February 26th 07 01:00 AM
scanning form and filling in blanks Swedish Excel Discussion (Misc queries) 0 October 27th 06 03:33 AM
Paste Special Skip Blanks not skipping blanks, but overwriting... gsrosin Excel Discussion (Misc queries) 0 February 22nd 05 03:33 AM


All times are GMT +1. The time now is 01:16 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"