I have no idea how to handel this

J

Jeffery B Paarsa

Hello,

I have a template that it takes two Bullets or Numbering list…
Say Medical problems are:
1. Problem 1
Medications are:
1. Med 1
Number of Problems could vary between say 1-10 and number of Medications,
also could vary between say 1-10.
I don’t want to leave 10 text fields for each Problems and Medications
lists, which the document comes out very ugly. I want to be able only list
say 5 problems for a patient with 5 problems and medications of 3 on these
ordered lists and my next line/paragraph starts after 5th problems list and
3rd medications… I do not want to leave extra blank like of say 5 empty
problems and 7 empty line for the medications list.

Any great/brilliant idea with sample code is appreciated in advance… Of if I
leave 10 text fields for each, how can I delete the extra ones off of the
document?

Regards

Jeffery B. Paarsa
 
P

Playing WMA files in squence

Hello,

Well, since no body responded to me I resolved my problem myself and I could
not beleive how easy it was! I decided to post this so if anybody had my
problem could find my solution and resolve it...

On my UserForm I created two Textboxes one for my Problem list and another
for my Medication list both with Multiline set to True. On the Userform
using Labels I asked the user enter the Problems & Medications seperated with
comma. Using the SPLIT and TRIM command and vbCRLF, I was able to create
unlimited ordered list entry for both Problems and Medications... Here is the
code I used to this:

Dim strArray As Variant
Dim i, j As Integer
PForms.SSProblems.Text = StrConv(PForms.SSProblems.Text, 3)
strArray = Split(PForms.SSProblems.Text, ",")
j = UBound(strArray)
For i = 0 To j
strArray(i) = LTrim(strArray(i))
Next
Set BMRange = SocServ.Bookmarks("Problems").Range
BMRange.Text = strArray(0)
For i = 1 To j
BMRange.Text = BMRange.Text + vbCrLf + strArray(i)
Next
SocServ.Bookmarks.Add "Problems", BMRange

Regards,
Jeff Paarsa
 
P

Playing WMA files in squence

Hello,

Well, since no body responded to me I resolved my problem myself and I could
not beleive how easy it was! I decided to post this so if anybody had my
problem could find my solution and resolve it...

On my UserForm I created two Textboxes one for my Problem list and another
for my Medication list both with Multiline set to True. On the Userform
using Labels I asked the user enter the Problems & Medications seperated with
comma. Using the SPLIT and TRIM command and vbCRLF, I was able to create
unlimited ordered list entry for both Problems and Medications... Here is the
code I used to this:

Dim strArray As Variant
Dim i, j As Integer
PForms.SSProblems.Text = StrConv(PForms.SSProblems.Text, 3)
strArray = Split(PForms.SSProblems.Text, ",")
j = UBound(strArray)
For i = 0 To j
strArray(i) = LTrim(strArray(i))
Next
Set BMRange = SocServ.Bookmarks("Problems").Range
BMRange.Text = strArray(0)
For i = 1 To j
BMRange.Text = BMRange.Text + vbCrLf + strArray(i)
Next
SocServ.Bookmarks.Add "Problems", BMRange

Regards,
Jeff Paarsa
 

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