Visualizzazione dei risultati da 1 a 9 su 9
  1. #1
    Utente di HTML.it L'avatar di cassano
    Registrato dal
    Aug 2004
    Messaggi
    3,002

    [vb6] intercettare caselle di testo excel

    come posso scrivere dentro le caselle di testo create con excel ???

  2. #2
    Utente di HTML.it L'avatar di cassano
    Registrato dal
    Aug 2004
    Messaggi
    3,002
    up

  3. #3
    Ti inserisco questo breve esempio.
    Ciao

    codice:
    'dichiarazioni
    Dim xl As Object
    Dim sheet_excel As Object
    Dim excel_sheet As Object
    Dim s As Integer
    
    
    'dichiarazione dell'oggetto
    Set xl = CreateObject("Excel.Application")
    'xl.Visible = True 'vedi il foglio mentre si compone
    Set sheet_excel = xl.Workbooks.Add  'aggiunge foglio EXCEL
    'salvo il file
    sheet_excel.SaveAs FileName:="c:\mq08.xls"
    ' Apre Excel spreadsheet.
    xl.Workbooks.Open FileName:="c:\mq08.xls"
    ' Check dell'ultima versoine.
    If Val(xl.Application.Version) >= 8 Then
        Set excel_sheet = xl.ActiveSheet
    Else
        Set excel_sheet = xl
    End If
        
    xl.Range("A3").Value = "L W"        'scrive il testo nella cella(es pippo)
    xl.Range("B3").NumberFormat = "@"   'format il testo in char
    xl.Range("B3").Value = "Data"
    xl.Range("C3").NumberFormat = "@"   'format il testo in char
    xl.Range("C3").Value = "Part Number Family"
    xl.Range("D3").Value = "C"
    xl.Range("E3").Value = "E"
    xl.Range("F3").Value = "A/C"
    xl.Range("G3").Value = "POS"
    xl.Range("H3").Value = "Data Scarico"

  4. #4
    Utente di HTML.it L'avatar di cassano
    Registrato dal
    Aug 2004
    Messaggi
    3,002
    grazie mille ma io intendevo quelle caselle ti testo che crei con gli strumenti di disegno.

  5. #5
    Sinceramente non ho capito, cosa intendi per caselle di testo create con excel?

  6. #6
    ActiveSheet.Shapes(1).Select
    Selection.Characters.Text = "Testo da inserire"

  7. #7
    Utente di HTML.it L'avatar di cassano
    Registrato dal
    Aug 2004
    Messaggi
    3,002
    grazie era quello che mi serviva,ho anche scoperto un trucchetto,con le macro mi registro quello che voglio fare , e poi lui mi crea il codice vba che poi io adatto.

  8. #8
    in realtà non lo sapevo... ho fatto anch'io così

  9. #9
    Utente di HTML.it L'avatar di cassano
    Registrato dal
    Aug 2004
    Messaggi
    3,002
    me lo potevi dire prima

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.