Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. UPPERCASE TEXT

UPPERCASE TEXT

Scheduled Pinned Locked Moved Visual Basic
questionhelpsales
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Lim Goh Tong
    wrote on last edited by
    #1

    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!

    D 1 Reply Last reply
    0
    • L Lim Goh Tong

      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!

      D Offline
      D Offline
      Dr_X
      wrote on last edited by
      #2

      Upper case is : Ucase$(string) Access to Excel: Add a reference to Microsoft Excel Object.

      Public Class clsXL
      Dim xl as Excel.Application

      Private Sub Class_Initialize()
      On Error Resume Next
      Set xl = CreateObject("Excel.Application")
      xl.DisplayAlerts = False
      End Sub

      Private Sub Class_Terminate()
      ' If IsLaunched Then xl.Application.Quit
      Set xl = Nothing
      End Sub

      Public 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 if

      End Function

      By doing this he can do what ever he wants with the excel spreadsheet Save, Sent To or Print. Hope this helps. Michael

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups