schnabs
Technical User
- Jan 21, 2009
- 50
Hello,
I am using VB Express to automate some functions in Excel. Currently I am trying to populate several cells with text. I was able to do this quite easily using the VBA built into Excel, but I want to automate everything through VB, rather than running a macro from another sheet.
The following is the code I used in Excel VBA.
'oxl.ActiveSheet.Range("A65536").End(xlUp).Select()
oxl.ActiveSheet.ActiveCell.Offset(3, 0).Select()
oxl.ActiveSheet.ActiveCell.FormulaR1C1 = "KEY"
oxl.ActiveSheet.ActiveCell.Offset(2, 0).Select()
oxl.ActiveSheet.ActiveCell.FormulaR1C1 = ". = Late Fee"
oxl.ActiveSheet.ActiveCell.Offset(1, 0).Select()
oxl.ActiveSheet.ActiveCell.FormulaR1C1 = "BMI = Office Letter"
oxl.ActiveSheet.ActiveCell.Offset(1, 0).Select()
oxl.ActiveSheet.ActiveCell.FormulaR1C1 = "Att = Attorney Letter"
oxl.ActiveSheet.ActiveCell.Offset(1, 0).Select()
oxl.ActiveSheet.ActiveCell.FormulaR1C1 = "L = Lien"
oxl.ActiveSheet.ActiveCell.Offset(1, 0).Select()
oxl.ActiveSheet.ActiveCell.FormulaR1C1 = "PP = Payment Plan"
oxl.ActiveSheet.ActiveCell.Offset(1, 0).Select()
oxl.ActiveSheet.ActiveCell.FormulaR1C1 = "Bankruptcy = Bankruptcy"
oxl.ActiveSheet.ActiveCell.Offset(1, 0).Select()
oxl.ActiveSheet.ActiveCell.FormulaR1C1 = "BF = Bank Foreclosure"
oxl.ActiveSheet.ActiveCell.Offset(1, 0).Select()
oxl.ActiveSheet.ActiveCell.FormulaR1C1 = "AF = Association Foreclosure"
oxl.ActiveSheet.ActiveCell.Offset(1, 0).Select()
I can't seem to figure out where I need to modify this in order to be usable in VB. Thanks in advance for the help.
I am using VB Express to automate some functions in Excel. Currently I am trying to populate several cells with text. I was able to do this quite easily using the VBA built into Excel, but I want to automate everything through VB, rather than running a macro from another sheet.
The following is the code I used in Excel VBA.
'oxl.ActiveSheet.Range("A65536").End(xlUp).Select()
oxl.ActiveSheet.ActiveCell.Offset(3, 0).Select()
oxl.ActiveSheet.ActiveCell.FormulaR1C1 = "KEY"
oxl.ActiveSheet.ActiveCell.Offset(2, 0).Select()
oxl.ActiveSheet.ActiveCell.FormulaR1C1 = ". = Late Fee"
oxl.ActiveSheet.ActiveCell.Offset(1, 0).Select()
oxl.ActiveSheet.ActiveCell.FormulaR1C1 = "BMI = Office Letter"
oxl.ActiveSheet.ActiveCell.Offset(1, 0).Select()
oxl.ActiveSheet.ActiveCell.FormulaR1C1 = "Att = Attorney Letter"
oxl.ActiveSheet.ActiveCell.Offset(1, 0).Select()
oxl.ActiveSheet.ActiveCell.FormulaR1C1 = "L = Lien"
oxl.ActiveSheet.ActiveCell.Offset(1, 0).Select()
oxl.ActiveSheet.ActiveCell.FormulaR1C1 = "PP = Payment Plan"
oxl.ActiveSheet.ActiveCell.Offset(1, 0).Select()
oxl.ActiveSheet.ActiveCell.FormulaR1C1 = "Bankruptcy = Bankruptcy"
oxl.ActiveSheet.ActiveCell.Offset(1, 0).Select()
oxl.ActiveSheet.ActiveCell.FormulaR1C1 = "BF = Bank Foreclosure"
oxl.ActiveSheet.ActiveCell.Offset(1, 0).Select()
oxl.ActiveSheet.ActiveCell.FormulaR1C1 = "AF = Association Foreclosure"
oxl.ActiveSheet.ActiveCell.Offset(1, 0).Select()
I can't seem to figure out where I need to modify this in order to be usable in VB. Thanks in advance for the help.