Pls help

  • Thread starter Thread starter kev
  • Start date Start date
K

kev

Hi all,

Ok, this is kinda difficult to explain but i will try to. I have a
workbook with 7 sheets inside. Each sheet accounts for one big category

for example Air, Noise, Pollution. Take the "Noise" active sheet for
example, it has a Row named Procedure/Training in which i want to
enable users to input info. This info is DocumentType and DocumentName
in which i present in in this format DocumentType:DocumentName. Now my
questions are as below:


1) how can i make it loop? I mean in just
one cell users might need to input in more than 1 document type n
document name(in pairs of course). How do i achieve this?


3) I have created a button in that cell that when the users click on
it, it displays the user form. The problem is do i need to create
separate buttons for each cell. This is gonna be very tedious as there
are way too many cells (more than 50) and if i were to code for each n
every button i cannot complete the project by next year. Please help.


I know thats a lot of request in here but someone pls try to help...i
need this project completed by end of this year and this portion i
mentioned here is just one there are many more sections to be
completed.


Many thanks in advance.


Kev.
 
sorry, forgot to paste the coding for the Ok button.

Private Sub cmdOk_Click()
ActiveWorkbook.Sheets("SERI_EQA1").Activate
Range("G3").Select
ActiveCell.Value = cboDocument.Value & ": " & txtName.Value
Range("G3").Select
End Sub
 
kev said:
sorry, forgot to paste the coding for the Ok button.

Private Sub cmdOk_Click()
ActiveWorkbook.Sheets("SERI_EQA1").Activate
Range("G3").Select
ActiveCell.Value = cboDocument.Value & ": " & txtName.Value
Range("G3").Select
End Sub
 
Do you need a user form for data entry? It might be easier if users
enter the data directly on the worksheet. I'd ask them to enter each
document on a separate row, but if you want multiple items in one cell,
they can press Alt+Enter to start a new line.

If you need a user form for data entry, you could try John Walkenbach's
Enhanced Data Form:

http://j-walk.com/ss/dataform/index.htm

If you need to modify it, or see how it works, you can purchase the
password to the VBA code for a reasonable fee.
 
Hi Debra,

Maybe i confused you a little. I have created a user form in which
users can input DocumentType(combo box) and DocumentName(textbox) in
cell G3. I have inserted a "Select Document" command button in which
when clicked will open the user form.What i need is a code or something
whereby allowing users to input in more DocumentType n DocumentName in
the same single cell. How do i achive this? (Perhaps a button with
"Add more docs"-just guessing)

OK BUTTON
Private Sub cmdOk_Click()
ActiveWorkbook.Sheets("SERI_EQA1").Activate
Range("G3").Select
ActiveCell.Value = cboDocument.Value & ": " & txtName.Value
Range("G3").Select
End Sub

USERFORM INITIALIZER
Private Sub UserForm_Initialize()
With cboDocument
.AddItem "Corporate Guideline"
.AddItem "Site Specific Guideline"
.AddItem "Training Course"
.AddItem "MDS"
.AddItem "Vspec"
End With
cboDocument.Value = ""
txtName.Value = ""
cboDocument.SetFocus

End Sub

2. Assuming query one is acomplished. Do i need to insert button and
create a new user form for each cell starting from G3 to G100? Is there
an easier way to do this?

Pls help i only have two days left to complete this.

Happy New Year.!
Thanks in advance.
 
You can change the button code, so it adds to the active cell, then
users could make a different selection, and click the button again.

'====================
Private Sub cmdOk_Click()
Dim strJoin As String

With ActiveCell
If .Value = "" Then
strJoin = ""
Else
strJoin = Chr(10)
End If
.Value = .Value & strJoin & _
cboDocument.Value & ": " & txtName.Value
End With

End Sub
'====================
Hi Debra,

Maybe i confused you a little. I have created a user form in which
users can input DocumentType(combo box) and DocumentName(textbox) in
cell G3. I have inserted a "Select Document" command button in which
when clicked will open the user form.What i need is a code or something
whereby allowing users to input in more DocumentType n DocumentName in
the same single cell. How do i achive this? (Perhaps a button with
"Add more docs"-just guessing)

OK BUTTON
Private Sub cmdOk_Click()
ActiveWorkbook.Sheets("SERI_EQA1").Activate
Range("G3").Select
ActiveCell.Value = cboDocument.Value & ": " & txtName.Value
Range("G3").Select
End Sub

USERFORM INITIALIZER
Private Sub UserForm_Initialize()
With cboDocument
.AddItem "Corporate Guideline"
.AddItem "Site Specific Guideline"
.AddItem "Training Course"
.AddItem "MDS"
.AddItem "Vspec"
End With
cboDocument.Value = ""
txtName.Value = ""
cboDocument.SetFocus

End Sub

2. Assuming query one is acomplished. Do i need to insert button and
create a new user form for each cell starting from G3 to G100? Is there
an easier way to do this?

Pls help i only have two days left to complete this.

Happy New Year.!
Thanks in advance.
 

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

Similar Threads

Separate macros for each cell. 3
Excel lookup across entire workbook 1
Email the form 1
sum 1
Excel Is this possible?? 3
Excel Import Comments 3
Imbedded Data Input sheet 3
automatic calculation 3

Back
Top