<ytd-expander id="expander" class="expander-exp style-scope ytd-comment-renderer" style="display: block; --ytd-expander-button-margin:4px 0 0 0; --ytd-expander-collapsed-height:80px;"><yt-formatted-string id="content-text" slot="content" split-lines="" class="style-scope ytd-comment-renderer" style="white-space: pre-wrap; --yt-endpoint-color:var(--yt-spec-call-to-action); --yt-endpoint-hover-color:var(--yt-spec-call-to-action); --yt-endpoint-visited-color:var(--yt-spec-call-to-action); color: var(--ytd-comment-text-color); font-size: 1.4rem; line-height: 2rem;">Hello and thank you for my acceptance on your site, one question....
I made an invoice-manager system using your site for help it works perfect but.....
My office has 4 pc's and I work from shared folders (Z://). The main drive is C... . Ofcourse when I work my invoice-manager from the C-drive my vba code for saving the file doesn't work.
How to use the IF,THEN,ELSE vba code so that if work from the C drive and it doesn't recognize this command it goes to a second command of saving the file at the C:// drive?
THIS IS MY VBA MODULE:Sub InvoiceReport()Dim myFile As String, lastRow As LongmyFile = "Z:\HLEKTRONIKH TIMOLOGISH\INVOICE MANAGER" & Sheets("Invoice").Range("J13") & "_" & Sheets("Invoice").Range("C13") & "_" & Sheets("Invoice").Range("J40") & "€" & "_" & Format(Now(), "dd-mm-yyyy") & "_" & ".xlsm"lastRow = Sheets("Data-Invoices").UsedRange.SpecialCells(xlCellTypeLastCell).Row + 1'create invoice in XLSX formatActiveWorkbook.SaveAs "Z:\HLEKTRONIKH TIMOLOGISH\INVOICE MANAGER" & Sheets("Invoice").Range("J13") & "_" & Sheets("Invoice").Range("C13") & "_" & Sheets("Invoice").Range("J40") & "€" & "_" & Format(Now(), "dd-mm-yyyy") & "_" & ".xlsm", FileFormat:=52'ActiveWorkbook.Close</yt-formatted-string>
</ytd-expander><ytd-comment-action-buttons-renderer id="action-buttons" class="style-scope ytd-comment-renderer" action-buttons-style="desktop-toolbar" style="display: block; color: var(--yt-spec-text-secondary); min-height: 16px; margin-top: 4px;">
</ytd-comment-action-buttons-renderer>
<ytd-menu-renderer class="style-scope ytd-comment-renderer" style="display: var(--layout-horizontal_-_display); flex-direction: var(--layout-horizontal_-_flex-direction);"></ytd-menu-renderer>
I made an invoice-manager system using your site for help it works perfect but.....
My office has 4 pc's and I work from shared folders (Z://). The main drive is C... . Ofcourse when I work my invoice-manager from the C-drive my vba code for saving the file doesn't work.
How to use the IF,THEN,ELSE vba code so that if work from the C drive and it doesn't recognize this command it goes to a second command of saving the file at the C:// drive?
THIS IS MY VBA MODULE:Sub InvoiceReport()Dim myFile As String, lastRow As LongmyFile = "Z:\HLEKTRONIKH TIMOLOGISH\INVOICE MANAGER" & Sheets("Invoice").Range("J13") & "_" & Sheets("Invoice").Range("C13") & "_" & Sheets("Invoice").Range("J40") & "€" & "_" & Format(Now(), "dd-mm-yyyy") & "_" & ".xlsm"lastRow = Sheets("Data-Invoices").UsedRange.SpecialCells(xlCellTypeLastCell).Row + 1'create invoice in XLSX formatActiveWorkbook.SaveAs "Z:\HLEKTRONIKH TIMOLOGISH\INVOICE MANAGER" & Sheets("Invoice").Range("J13") & "_" & Sheets("Invoice").Range("C13") & "_" & Sheets("Invoice").Range("J40") & "€" & "_" & Format(Now(), "dd-mm-yyyy") & "_" & ".xlsm", FileFormat:=52'ActiveWorkbook.Close</yt-formatted-string>
</ytd-expander><ytd-comment-action-buttons-renderer id="action-buttons" class="style-scope ytd-comment-renderer" action-buttons-style="desktop-toolbar" style="display: block; color: var(--yt-spec-text-secondary); min-height: 16px; margin-top: 4px;">
</ytd-comment-action-buttons-renderer>
<ytd-menu-renderer class="style-scope ytd-comment-renderer" style="display: var(--layout-horizontal_-_display); flex-direction: var(--layout-horizontal_-_flex-direction);"></ytd-menu-renderer>