fabyouless
Technical User
My prowess at Flex has grown since i've first started using Flex a year and a half ago. Still, i was wondering if it is possible to use Excel VBA to "push" information into a screen, e.g. SFSOADD.
Currently, i am using Flex to "pull" data from Excel. Upon given a range of Unreleased Shop Orders to delete, i've pasting the following code into VBA.
So, am i barking up the wrong tree? Have i already found the swiftest method at my disposal?
Thanks,
BLS
Currently, i am using Flex to "pull" data from Excel. Upon given a range of Unreleased Shop Orders to delete, i've pasting the following code into VBA.
Code:
Option Explicit
Const myFile = "C:\Documents and Settings\Brian\My Documents\frm SOxVarH.xls"
Const myPlace = "J1"
Const myTopRow = 2
Const myOrdNo = 1
Dim myRow As Long
Private Sub OrderNo_GotFocus()
Dim myXlBook As Object
Set myXlBook = GetObject(myFile)
With myXlBook.worksheets(1)
myRow = .range(myPlace).Value
If myRow < myTopRow Then
myRow = myTopRow
Else
myRow = myRow + 1
End If
OrderNo.Text = .cells(myRow, myOrdNo).Value
.range(myPlace).Value = myRow
End With
Set myXlBook = Nothing
If OrderNo.Text <> "" Then
SendKeys "{TAB}"
End If
End Sub
Private Sub OrderType_GotFocus()
If OrderPkg.Text = "MR" And OrderStatus.Text = "U" Then
SendKeys "^d"
Else
macForm.Cancel
End If
End Sub
Private Sub ItemNo_GotFocus()
macForm.Cancel
End Sub
So, am i barking up the wrong tree? Have i already found the swiftest method at my disposal?
Thanks,
BLS