I have a problem, how can I activate an existing worksheet it's a kind of selection or activation of a sheet in a workbook to fill with the write data. :-k
Example:
Sheet 1: if The payment is by check
Sheet 2: If the payment is by cash
Sheet 3: if the payment is by transfer
Sheet 4:...................................
Thanks for help. :oops:
Regards
Hanen TALBI
0
Comments
Hanen TALBI
Here's an example from some code I did a few years back:
The user is first prompted to select a Workbook file. Then the standard function SelectSheetsName presents a list of the available Worksheets from which the user chooses. AnalyzeData is custom finction to process data based on customer's needs.
Hanen TALBI
this line of code in the above example just opens the file and selects a sheet
Then you have your sheet selected and all you need to do is write data to it.
I'm using only one dataitem and I want to export to three excel sheets using filters soomething like if rec1.Field = 'A' then Data will be exported into sheet1 else if rec1.Field='B' then data will be exported to sheet2 else exported to sheet3 :-k
Help!!!! :oops:
Hanen TALBI
all you need to do is replace the part below with sheet1 or sheet2 or sheet3 and then write your values to the correct cells.