Visualizzazione dei risultati da 1 a 2 su 2
  1. #1
    Utente di HTML.it
    Registrato dal
    Jul 2005
    Messaggi
    154

    [VB] Cambio Parametro su file exel

    Ciao a tutti,

    ho scaricato un file in exel (gratuito) per la compilazione di fatture .
    questo file opera però su valori di IVA al 20% vorrei portarla al 22%.
    Ho spulciato il codice cercando di trovare nel file funzioni la costante fattura_importoiva (immagino che cambiando questo parametro da 20 a 22 tutto si risolva)
    Premetto che non sono un esperto di VB ho provato a consultare qualche manuale online per risolvere il problema!
    ora vi chiedo magari postando parte del codice del file funzione relativa alla fattura quale valore dovrei cambiare per raggiungere il mio scopo.


    codice:
    Sub SalvaFattura()
        Dim r As Integer, c As Integer
        
        Application.ScreenUpdating = False
        With Archivio
            .Unprotect sPassword
            If frmFattura.Tag = "" Then
                r = .[archivio_end].Row
                .Rows(r).Insert xlDown
            Else
                r = frmFattura.Tag
            End If
            c = .[archivio_end].Column
            With .Range(.Cells(r, c), .Cells(r, c + 8))
                .Interior.ColorIndex = 2
                .Font.Bold = False
                .Borders(xlEdgeLeft).LineStyle = xlContinuous
                .Borders(xlEdgeBottom).LineStyle = xlContinuous
                .Borders(xlEdgeRight).LineStyle = xlContinuous
                .Borders(xlInsideVertical).LineStyle = xlContinuous
            End With
            With .Cells(r, c)
                .Value = Parametri.[fattura_num]
                .Locked = False
            End With
            With .Cells(r, c + 1)
                .NumberFormat = "dd/mm/yyyy"
                .Value = Parametri.[fattura_data]
            End With
            With .Cells(r, c + 2)
                .NumberFormat = "@"
                .Value = Parametri.[fattura_cli1]
            End With
            With .Cells(r, c + 3)
                .NumberFormat = "#,##0.00"
                .Value = Parametri.[fattura_totimponibile]
            End With
            With .Cells(r, c + 4)
                .NumberFormat = "#,##0.00"
                .Value = Parametri.[fattura_importoiva]
            End With
            With .Cells(r, c + 5)
                .NumberFormat = "#,##0.00"
                .Value = Parametri.[fattura_importoritenuta]
            End With
            With .Cells(r, c + 6)
                .NumberFormat = "#,##0.00"
                .Value = Parametri.[fattura_totcassa]
            End With
            With .Cells(r, c + 7)
                .NumberFormat = "#,##0.00"
                .Value = Parametri.[fattura_importolordo]
            End With
            With .Cells(r, c + 8)
                .NumberFormat = "#,##0.00"
                .Value = Parametri.[fattura_importototale]
            End With
            .Protect Password:=sPassword, DrawingObjects:=True, Contents:=True, _
                    Scenarios:=True, UserInterfaceOnly:=True
        End With

    spero possiate aiutarmi senza violare principi fondamentali dei forum...

    grazie anticipatamente

    gefrio
    Ultima modifica di LeleFT; 09-03-2016 a 12:11 Motivo: Aggiunta tag CODE

  2. #2
    Moderatore di Programmazione L'avatar di LeleFT
    Registrato dal
    Jun 2003
    Messaggi
    17,320
    VB ha un forum dedicato: Visual Basic e .NET Framework.
    Sposto.
    PS: il codice va postato all'interno degli appositi tag CODE. Ho sistemato io.


    Ciao.
    "Perchè spendere anche solo 5 dollari per un S.O., quando posso averne uno gratis e spendere quei 5 dollari per 5 bottiglie di birra?" [Jon "maddog" Hall]
    Fatti non foste a viver come bruti, ma per seguir virtute e canoscenza

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.