LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 50
Default please help! Replacing blank cells from a userform textbox

I have created a database with two userforms the 1st userform enters the data
into the database, while the second finds data from the database based on a
project number and allows the user to edit the information that has already
been entered. The problem I am having is when I enter the data in the 1st
userform if I don't put a character in each textbox in the userform then when
I go to find the information it won't allow me to edit and save any of my
changes made to the project. Currently I am just putting a "x" into each
textbox so I can edit/save it, but with 45+ Textboxes on the userform this is
tedious. Is their anyway to make it so if nothing was entered I can still
edit/save it. Here is a portion of the code that I am currently using (the
rest of the code is same as what I have here). Thanks for your help.

Private Sub SaveProjectButton_Click()
Sheet1.Columns(1).Find(tbProjectNumber.Value).Offs et(0, 1).Value =
Replace(Sheet1.Columns(1).Find(tbProjectNumber.Val ue).Offset(0, 1).Value,
Sheet1.Columns(1).Find(tbProjectNumber.Value).Offs et(0, 1).Value,
tbAEName.Value)
Sheet1.Columns(1).Find(tbProjectNumber.Value).Offs et(0, 2).Value =
Replace(Sheet1.Columns(1).Find(tbProjectNumber.Val ue).Offset(0, 2).Value,
Sheet1.Columns(1).Find(tbProjectNumber.Value).Offs et(0, 2).Value,
tbSiteOwnerName.Value)
Sheet1.Columns(1).Find(tbProjectNumber.Value).Offs et(0, 3).Value =
Replace(Sheet1.Columns(1).Find(tbProjectNumber.Val ue).Offset(0, 3).Value,
Sheet1.Columns(1).Find(tbProjectNumber.Value).Offs et(0, 3).Value,
tbPGLead.Value)
Sheet1.Columns(1).Find(tbProjectNumber.Value).Offs et(0, 4).Value =
Replace(Sheet1.Columns(1).Find(tbProjectNumber.Val ue).Offset(0, 4).Value,
Sheet1.Columns(1).Find(tbProjectNumber.Value).Offs et(0, 4).Value,
cbProjectType)
Sheet1.Columns(1).Find(tbProjectNumber.Value).Offs et(0, 5).Value =
Replace(Sheet1.Columns(1).Find(tbProjectNumber.Val ue).Offset(0, 5).Value,
Sheet1.Columns(1).Find(tbProjectNumber.Value).Offs et(0, 5).Value,
cbProjectCategory)
Sheet2.Columns(1).Find(tbProjectNumber.Value).Offs et(0, 1).Value =
Replace(Sheet2.Columns(1).Find(tbProjectNumber.Val ue).Offset(0, 1).Value,
Sheet2.Columns(1).Find(tbProjectNumber.Value).Offs et(0, 1).Value,
tbAEName.Value)

 
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
Replacing blank cells with zeros donpayette Excel Discussion (Misc queries) 4 September 25th 08 07:21 PM
prevent copied blank cells from replacing existing data lilleke Excel Worksheet Functions 10 August 28th 07 09:26 PM
Replacing blank cells Chris Stammers Excel Worksheet Functions 2 December 1st 05 01:41 PM
Replacing blank cells with zeros Ben Excel Programming 1 May 8th 05 09:21 PM
VBA Userform Textbox re-writing cells in Excel Pete Excel Programming 5 November 7th 04 09:43 PM


All times are GMT +1. The time now is 05:00 PM.

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"