Forum Discussion
B_H33
Nov 02, 2021Copper Contributor
Help to convert VBA to Excel Online script
Hi, I need help converting a VBA to a Script for Excel Online. Can anyone help me with this?? VBA code is: Private Sub Worksheet_Change(ByVal Target As Range) On Error Resume Next ActiveSheet.Unp...
JKPieterse
Nov 02, 2021Silver Contributor
Hi B_H33
Office Script does not support event code like your Worksheet_Change event, you can only start scripts manually. Have you tried to record the steps using the script recorder?
Office Script does not support event code like your Worksheet_Change event, you can only start scripts manually. Have you tried to record the steps using the script recorder?
- B_H33Nov 02, 2021Copper ContributorHi Jan,
I only want to auto sort column F.
Can you help me write a script?- JKPieterseNov 03, 2021Silver ContributorB_H33 Have you tried recording a script yet?
- B_H33Nov 03, 2021Copper ContributorYes I did today. But when I run it it only sorts column F and doesn't extend to other columns...
- PeterBartholomew1Nov 02, 2021Silver Contributor
I found it somewhat frustrating. The only things I tend to use VBA for are to create sketches to illustrate engineering data using shapes and for event handling to create interactive user interfaces. Nothing of which works on-line.
Once Lambda functions are fully functional, many of the process steps that used to be implemented using VBA could be achieved with worksheet formula. In the present case, the data input table could be left in its original sequence whilst a formula would give the sorted representation on a separate worksheet.