I'm baffled.
I have a simple form with an unbound listbox, rowsource is a select statement. A command button has code to read the number of selections highlighted, and then calls a function to take info from each record and populate a Word template. Works fine.
I have another form, same idea, different rowsource data and different Word template, with separate vba coding - i.e. same coding as the first but renamed variables. All form properties are the same. That code works fine as well, BUT only if I run it from home.
The laptop is the same laptop, and at home I can run it locally or from a share drive on the company's server through a vbn connection, from Home it works fine.
If I take the same laptop to work, the first form works fine. The second form does not retain the multi select highlights, and performes the functions only on the 1st record, gets to a certain point where the highlighted selections become un-highlighted, and finishes up thinking there was only ever one record selected.
It does this de-highlighting when it hits this portion of the code:
Set oDoc = oApp.Documents.Add(strTemplateName)
Again, no problem when I carry the laptop home and run it, no problem with the other almost identical form, and even more confusing, both forms work fine for a colleague at work on their laptop. "must be me"
Any ideas would be a tremendous help - I'm out of ideas.
Thanks
I have a simple form with an unbound listbox, rowsource is a select statement. A command button has code to read the number of selections highlighted, and then calls a function to take info from each record and populate a Word template. Works fine.
I have another form, same idea, different rowsource data and different Word template, with separate vba coding - i.e. same coding as the first but renamed variables. All form properties are the same. That code works fine as well, BUT only if I run it from home.
The laptop is the same laptop, and at home I can run it locally or from a share drive on the company's server through a vbn connection, from Home it works fine.
If I take the same laptop to work, the first form works fine. The second form does not retain the multi select highlights, and performes the functions only on the 1st record, gets to a certain point where the highlighted selections become un-highlighted, and finishes up thinking there was only ever one record selected.
It does this de-highlighting when it hits this portion of the code:
Set oDoc = oApp.Documents.Add(strTemplateName)
Again, no problem when I carry the laptop home and run it, no problem with the other almost identical form, and even more confusing, both forms work fine for a colleague at work on their laptop. "must be me"
Any ideas would be a tremendous help - I'm out of ideas.
Thanks