Click here to Skip to main content
15,905,420 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Fill Treeview using recursion Pin
sterenas11-Dec-18 7:51
sterenas11-Dec-18 7:51 
GeneralRe: Fill Treeview using recursion Pin
Eddy Vluggen11-Dec-18 23:10
professionalEddy Vluggen11-Dec-18 23:10 
Questionentity framework Group by multiple columns and count the number of groups with more than 1 item Pin
desanti6-Dec-18 11:24
desanti6-Dec-18 11:24 
AnswerRe: entity framework Group by multiple columns and count the number of groups with more than 1 item Pin
Richard Deeming7-Dec-18 7:46
mveRichard Deeming7-Dec-18 7:46 
QuestionProblems with Entity Famework and bindingsources Pin
desanti6-Dec-18 0:13
desanti6-Dec-18 0:13 
QuestionDrawlines is correct or not ? Pin
Coffee_Break5-Dec-18 1:27
Coffee_Break5-Dec-18 1:27 
AnswerRe: Drawlines is correct or not ? Pin
Eddy Vluggen5-Dec-18 2:05
professionalEddy Vluggen5-Dec-18 2:05 
Questionsave my excel invoice in excel sheet Pin
kami1244-Dec-18 8:04
kami1244-Dec-18 8:04 
Option Explicit

Sub Button4_Click()

Dim rng As Range
Dim temp As Variant
Dim i As Long
Dim a As Long
Dim rng_dest As Range

Application.ScreenUpdating = False

i = 1

Set rng_dest = Sheets("Invoice data").Range("C:H")

' Find first empty row in columns D:G on sheet Invoice data

Do Until WorksheetFunction.CountA(rng_dest.Rows(i)) = 0

i = i + 1

Loop

'Copy range B16:I38 on sheet Invoice to Variant array

Set rng = Sheets("Invoice").Range("A22:C33")

' Copy rows containing values to sheet Invoice data

For a = 1 To rng.Rows.Count

If WorksheetFunction.CountA(rng.Rows(a)) <> 0 Then

rng_dest.Rows(i).Value = rng.Rows(a).Value

'Copy Invoice number

Sheets("Invoice data").Range("A" & i).Value = Sheets("Invoice").Range("J8").Value

'Copy Date

Sheets("Invoice data").Range("B" & i).Value = Sheets("Invoice").Range("J7").Value

'Copy Company name

Sheets("Invoice data").Range("C" & i).Value = Sheets("Invoice").Range("C13").Value



i = i + 1

End If

Next a






Application.ScreenUpdating = True
Range("J8").Value = Range("J8").Value + 1
'Sheets("Invoice").Range("Invoicebody").Clear
'ActiveSheet.Range("J8").Value = ActiveSheet.Range("J8").Value + 1


End Sub
Sub Macro1()
'
' Macro1 Macro
'

'
Range("E19").Select
Selection.Copy
Sheets("Invoice data").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
End Sub




result here
Invoice No. Date Customer Category Product Description Quantity Unit Price Amount
1/15/1900 12/4/2018 Kashif GDFItems 214, 421 #N/A #N/A #N/A
1/15/1900 12/4/2018 Kashif GDAItems Honda 2036 #N/A #N/A #N/A
1/15/1900 12/4/2018 Kashif GeneralItems Injector Cleaner STP Diesel #N/A #N/A #N/A
1/15/1900 12/4/2018 Kashif GDFItems 214, 421 #N/A #N/A #N/A
1/15/1900 12/4/2018 Kashif GDFItems 471 - 215 - 433 - 206 #N/A #N/A #N/A
1/15/1900 12/4/2018 Kashif GDFItems 471 - 215 - 433 - 206 #N/A #N/A #N/A
1/15/1900 12/4/2018 Kashif GDOItems Fiat Tractor 508 #N/A #N/A #N/A
1/15/1900 12/4/2018 Kashif GDFItems 214, 421 #N/A #N/A #N/A
1/15/1900 12/4/2018 Kashif GDFItems 221 #N/A #N/A #N/A
1/15/1900 12/4/2018 Kashif GDOItems 1 C toyota 412 #N/A #N/A #N/A
1/15/1900 12/4/2018 Kashif GDOItems 1 C toyota 412 #N/A #N/A #N/A
1/15/1900 12/4/2018 Kashif GeneralItems Injector Cleaner STP Petrol #N/A #N/A #N/A


from this invoice

INVOICE


1
Your Complete Adress
------ CUSTOMER ID SEFS
------ INVOICE DATE December 4, 2018
PHONE : 000-0000000 INVOICE NUMBER 16
FAX: 000-0000000 PAYMENT DATE BY December 19, 2018


BILL TO
NAME Kashif
CONPONEY NAME
ADDRESS

PHONE : 000-0000000
EMAIL ID abc@example.com


Category Product Description Quentity Unit Price Amount
GDFItems 214, 421 4 Rs. 5.00 Rs 20.00
GDAItems Honda 2036 2 Rs. 6.00 Rs 12.00
GeneralItems Injector Cleaner STP Diesel 3 Rs. 5.00 Rs 15.00
GDFItems 214, 421 3 Rs. 5.00 Rs 15.00
GDFItems 471 - 215 - 433 - 206 3 Rs. 5.00 Rs 15.00
GDFItems 471 - 215 - 433 - 206 3 Rs. 5.00 Rs 15.00
GDOItems Fiat Tractor 508 4 Rs. 5.00 Rs 20.00
GDFItems 214, 421 3 Rs. 5.00 Rs 15.00
GDFItems 221 3 Rs. 2.00 Rs 6.00
GDOItems 1 C toyota 412 2 Rs. 5.00 Rs 10.00
GDOItems 1 C toyota 412 3 Rs. 3.00 Rs 9.00
GeneralItems Injector Cleaner STP Petrol 3 Rs. 6.00 Rs 18.00

SPECIAL INSTRECTIONS SUBTOTAL Rs. 33,288.00
1. Please mention ur invoice number in cheque. TAX [% ] 2
2. Last date to deposit your due ammount by 15 days of invoice . TAX AMOUNT Rs. 665.76
DISCOUNT Rs. 222.00
TOTAL Rs. 33,731.76

WITHOUT TAX Rs. 33,066.00



Customer Signature Signature






make sure your cheque is payable to deep
For any inquiry you can contact us : abc@email.com
Thanks for your business
QuestionRe: save my excel invoice in excel sheet Pin
Richard MacCutchan4-Dec-18 8:58
mveRichard MacCutchan4-Dec-18 8:58 
QuestionError ContextSwitchDeadlock Pin
desanti4-Dec-18 5:33
desanti4-Dec-18 5:33 
AnswerRe: Error ContextSwitchDeadlock Pin
Eddy Vluggen4-Dec-18 6:33
professionalEddy Vluggen4-Dec-18 6:33 
GeneralRe: Error ContextSwitchDeadlock Pin
desanti4-Dec-18 8:45
desanti4-Dec-18 8:45 
GeneralRe: Error ContextSwitchDeadlock Pin
Eddy Vluggen4-Dec-18 9:37
professionalEddy Vluggen4-Dec-18 9:37 
GeneralRe: Error ContextSwitchDeadlock Pin
desanti5-Dec-18 1:18
desanti5-Dec-18 1:18 
GeneralRe: Error ContextSwitchDeadlock Pin
Eddy Vluggen5-Dec-18 1:43
professionalEddy Vluggen5-Dec-18 1:43 
GeneralRe: Error ContextSwitchDeadlock Pin
desanti5-Dec-18 2:08
desanti5-Dec-18 2:08 
GeneralRe: Error ContextSwitchDeadlock Pin
Eddy Vluggen5-Dec-18 2:37
professionalEddy Vluggen5-Dec-18 2:37 
GeneralRe: Error ContextSwitchDeadlock Pin
desanti5-Dec-18 2:49
desanti5-Dec-18 2:49 
GeneralRe: Error ContextSwitchDeadlock Pin
Eddy Vluggen5-Dec-18 2:52
professionalEddy Vluggen5-Dec-18 2:52 
GeneralRe: Error ContextSwitchDeadlock Pin
desanti5-Dec-18 2:59
desanti5-Dec-18 2:59 
GeneralRe: Error ContextSwitchDeadlock Pin
Eddy Vluggen5-Dec-18 3:01
professionalEddy Vluggen5-Dec-18 3:01 
GeneralRe: Error ContextSwitchDeadlock Pin
desanti5-Dec-18 3:05
desanti5-Dec-18 3:05 
GeneralRe: Error ContextSwitchDeadlock Pin
Eddy Vluggen5-Dec-18 3:09
professionalEddy Vluggen5-Dec-18 3:09 
GeneralRe: Error ContextSwitchDeadlock Pin
desanti5-Dec-18 3:14
desanti5-Dec-18 3:14 
GeneralRe: Error ContextSwitchDeadlock Pin
Eddy Vluggen5-Dec-18 3:19
professionalEddy Vluggen5-Dec-18 3:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.