UPPERCASE TEXT
-
I want the text that we key in in the vb form must in Uppercase.What is the method's?Help....................help............ Hi, i have create a program using VB6.The purpose of this program are for sales department person key in the data and then review by manager.Now, my problem is manager want me to create a command button to export the data from microsoft access to excel.What is the command button code and the step? Another Question,this program must set up in the office and all the staff can see and use this program at their own PC's!Thank for ur help!
-
I want the text that we key in in the vb form must in Uppercase.What is the method's?Help....................help............ Hi, i have create a program using VB6.The purpose of this program are for sales department person key in the data and then review by manager.Now, my problem is manager want me to create a command button to export the data from microsoft access to excel.What is the command button code and the step? Another Question,this program must set up in the office and all the staff can see and use this program at their own PC's!Thank for ur help!
Upper case is : Ucase$(string) Access to Excel: Add a reference to Microsoft Excel Object.
Public Class clsXL
Dim xl as Excel.ApplicationPrivate Sub Class_Initialize()
On Error Resume Next
Set xl = CreateObject("Excel.Application")
xl.DisplayAlerts = False
End SubPrivate Sub Class_Terminate()
' If IsLaunched Then xl.Application.Quit
Set xl = Nothing
End SubPublic Function Export(rs As Recordset) as Boolean
dim ws as Worksheet
dim c as integer 'column
dim i as integer 'row counter
If Not xl Is Nothing Then
xl.Workbooks.Add
Set ws = xl.ActiveSheet'Set the column headers
'....
'Now loop through the rows & columns of the recordset to add the values
i = 2
do while not rs.eof
for c = rs.fields.count
w.Cells(i, c) = .Fields(c).Value & vbNullString
i = i + 1
rs.movenext
next
loop'Format work sheet further
'now print preview the sheet
xl.DisplayAlerts = False
xl.Visible = True
xl.ActiveWorkbook.Worksheets.PrintOut , , , True
xl.Visible = False
xl.Application.Quit
end ifEnd Function
By doing this he can do what ever he wants with the excel spreadsheet Save, Sent To or Print. Hope this helps. Michael