title: Excel 365 Basic TypeScript - Go to page after running a script
body: <h2>Summary</h2>
  <p>How do I make an Excel script &quot;go to&quot; a specific sheet after copying data from an initial sheet? (I.e. I can record a script to copy data from Sheet1 and paste to specific columns on Sheet2 easily but I want the user to see Sheet2 once this is complete)</p>
  <h2>Main question</h2>
  <p>I have just started using Excel scripts for our small company. The company uses an Excel document on a shared OneDrive account to handle booking in jobs/invoicing. The system works but is limited. I created an Excel system using VBA that had pages to enter information (such as a booking in page, a quote calculation page etc) and create invoices at the click of a button (instead of duplicating a blank invoice, copying a row from the main sheet onto row two of the blank invoice, adding parts and pricing, then editing a few cells in a row near the bottom which is then copied to another sheet for record-keeping). The problem was that the macros can't run on Excel for the web &amp; some users are remote/mobile, so I upgraded my license to access scripts instead so everyone could update the sheet as and when required and still use buttons to carry out all required functions.</p>
  <p>My programming knowledge is extremely limited - I could edit VBA code relatively easily after recording my actions, and felt it was quite intuitive, however I am struggling a bit more with this in TypeScript. I could always find huge swathes of VBA help on forums with quick Google searches for similar issues and adapt the answers to suit my needs, however there isn't much out there on Excel scripts with TypeScript yet.</p>
  <p>Often the basic scripts I have created are to move information from an initial sheet to a register. For example, an initial call-handling sheet that the user inputs the call information (who is calling, phone number, name, requirements etc), the user then clicks a button to store the call information on the call register. All users can view the call register, for example if a customer called back later and I answered, I can see what information my colleague discussed with them earlier.</p>
  <p>At the moment I want to move information from an initial sheet to a secondary sheet depending on what the user wants to do. I have one user entered field on the initial sheet (a unique identifier) that looks up information from a customer database, a call database and a bookings database, then a selection of buttons depending on what the user wants to do, for example book in a job, update customer information etc. (Likely to be 5-6 buttons) If the user wants to book in a job, I want that button to take all the information (the unique identifier and the various lookup values from the different databases) and put it onto another page, which will contain fields to specify job details (parts required, pricing, availability etc). I have no problem creating a script to move the information, however when I run it, the user stays on the initial sheet. I want the user to be automatically taken to the page the script copied the information to, so they can fill out any subsequent information required.</p>
  <p>How can I write the code to go to the page in a way that I can just copy-paste it into the current script?</p>