Global Vb Script S’abonner

0
Avatar
Legacy Poster

Hi Guys,

 

New to VB Scripts

 

Is there a way to create VB script to identify certain lines (example: WWYY or DDMMYY) and prompt for data to be entered?

Normal data entry control is not working as these are being extracted from database.

 

If yes, how would the VB script look like?

 

Thanks in advance.

4 commentaires

0
Avatar
Legacy Poster
Actions pour les commentaires Permalien

You'll want to put this in the "Event Control Script" of the individual data field you want to prompt for. Put it into "OnIdenticalCopies" event control:

 

 

Value = inputbox("Enter the input")
 
0
Avatar
Legacy Poster
Actions pour les commentaires Permalien

Sorry, wrong post, i'll repost.

0
Avatar
Legacy Poster
Actions pour les commentaires Permalien

Hi nRyder,

 

Thanks for reply. 

And sorry, for keep editing my post, just found out i can't send xlsx files but able to attach xls format.

Now i can expalin my question better:

 

From attached label template:

 

1. Record no.1 has WWYY on Line no.2

2. Record no.2 has WWYY on Line no.3

 

So how would i approach this, so that i can only edit WWYY at print time. At the moment data entry control is not suitable,

because if WWYY are on different lines it would mess up other data.

 
[attachment=541:Database.xls]
[attachment=542:Label Template.btw]
 
Regards and Thanks in advance,
Thevan
0
Avatar
Legacy Poster
Actions pour les commentaires Permalien

You want to prompt a user at print time for data if the database says "WWYY", but if it says anything else, just use the data from the XLS?

 

Sounds like you'd want to create a separate data source that is linked to that XLS field, but not on the label (off to the side so it doesn't print. It's just used for control purposes.) Let's call that data source: "Line2Data"

 

If you do that, then you would need a VB script in your actual PRINTED object that was something along the lines of:

 

 

if Line2Data = "MMYY" then
  value = inputbox("Enter the Input:")
else
  Value = Line2Data
end if
 

Vous devez vous connecter pour laisser un commentaire.