|
-
Dec 28th, 2005, 04:57 AM
#41
Re: Please help me with TAB function...
VB Code:
Private Sub cmdtotal_Click()
Dim MyTotal As Single
Dim myTable As Table
Dim myCel As Cell
Set myTable = ActiveDocument.Tables(1)
Dim i As Integer
For i = 2 To myTable.Rows.Count '2 because you dont want to total the header
Set myCel = myTable.Rows(i).Cells.Item(5)
MyTotal = MyTotal + CSng(Replace(myCel.Range.Text, Chr(13) & Chr(7), ""))
Next
'Just as an example of how to display the total.
MsgBox "Total: " & MyTotal
End Sub
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Dec 29th, 2005, 03:33 AM
#42
Thread Starter
Addicted Member
-
Dec 29th, 2005, 04:11 AM
#43
Re: Please help me with TAB function...
Try a "Application.ScreenRefresh" after the total calculation. I couldnt get your latest version to actually run for some reason.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Dec 29th, 2005, 04:57 AM
#44
Thread Starter
Addicted Member
Re: Please help me with TAB function...
Hi,
I had tried this but still did not work....
VB Code:
Private Sub cmdtotal_Click()
Dim MyTotal As Single
Dim myTable As Table
Dim myCel As Cell
Set myTable = ActiveDocument.Tables(1)
Dim i As Integer
For i = 2 To myTable.Rows.Count '2 because you dont want to total the header
Set myCel = myTable.Rows(i).Cells.Item(5)
MyTotal = MyTotal + CSng(Replace(myCel.Range.Text, Chr(13) & Chr(7), ""))
Next
Application.ScreenRefresh
ActiveDocument.FormFields("bkTotal").Result = MyTotal
End Sub
-
Dec 29th, 2005, 02:09 PM
#45
Re: Please help me with TAB function...
You have it backwards. Should be refreshing after the total is applied.
VB Code:
Private Sub cmdtotal_Click()
Dim MyTotal As Single
Dim myTable As Table
Dim myCel As Cell
Set myTable = ActiveDocument.Tables(1)
Dim i As Integer
For i = 2 To myTable.Rows.Count '2 because you dont want to total the header
Set myCel = myTable.Rows(i).Cells.Item(5)
MyTotal = MyTotal + CSng(Replace(myCel.Range.Text, Chr(13) & Chr(7), ""))
Next
ActiveDocument.FormFields("bkTotal").Result = MyTotal
Application.ScreenRefresh
End Sub
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Dec 29th, 2005, 07:50 PM
#46
Thread Starter
Addicted Member
-
Dec 29th, 2005, 08:22 PM
#47
Re: Please help me with TAB function...
Yes, that hte issue I had with your previous attachment. Not sure why it wont get out of design mode.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Dec 29th, 2005, 09:39 PM
#48
Thread Starter
Addicted Member
Re: Please help me with TAB function...
Hi,
Thank you very much anyway for your kind helps...if you are not sure..I will ask in a new thread....is that all right..???
In addition, is that all right to post this issues and problem in the TUTORIAL so, everybody can learn how to make interactive invoice using VBA Words..???
Please let me know for this....
Thank you so much for your kind helps....
All the best for you!!!
Jennifer
-
Dec 29th, 2005, 09:56 PM
#49
Re: Please help me with TAB function...
Your Welcome 
Basically the Tutorials section would require a reformatting of the concerned post(s) but yes if you'd like.
Yes, you can ask this new issue in a new thread to keep things segragated.
Ps, dont forget to 'Resolve' this thread then if your going to start the new issue in a new thread. 
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Dec 29th, 2005, 11:08 PM
#50
Thread Starter
Addicted Member
Re: Please help me with TAB function...
How to put 'RESOLVE' to this thread..???
-
Dec 30th, 2005, 12:23 AM
#51
Re: Please help me with TAB function...
Go to the Thread Tools menu when viewing your thread and click the "Mark thread as Resolved".
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|