Hi All
Does anyone know of any resources which can teach me about preparing DB queries in excel using VBA? I have no idea and recording Microsoft Query macros will get me so far.
I have looked around, but most of the stuff I have found assumes I know more than I do. I need to start at the...
Hi Narayan
Thank you for your reply.
Your code does what I am trying to achieve, except I would like the code to do the checking for the new accounts, not the user identifying the new accounts. Is that possible?
Cheers
Shaun
Hi All,
I have two tables:
COA; and
UPCOA.
The COA table is the table which the user works with to categorise various account (in cloumn G).
The UPCOA table is the imported table from a database which contains the latest information from which the COA table requires updating.
From time to...
Hi All
I have a situation where X people have given and received an amount of things amongst themselves. I need to be able to "net" off the series of related transactions.
In the simple example attached, person A has given 100 oranges to person B. Person B has given 70 oranges to person C. The...
Hi Guys
I have persevered and have cobbled together an appointment management tool.
It is entirely user driven via: msgbox so that nothing will be changed unless the user wants a particular appointment altered.
I have included a unique identifier when an appointment is added in the subject so...
Hi All
I have been tasked with challenge, manage a client list in Excel that will also manage Outlook appointments.
I have found some code which I have superficially altered:
Option Explicit
Sub AddToOutlook()
Dim OL As Outlook.Application
Dim olAppt As Outlook.AppointmentItem...
Hi Alamzeb
Please see attached, hopefully it is what you were after.
I have made some changes to your trim formula. I believe you were having difficulty because the value your formula returned was text not a number. To correct this I multiplied the result by *1.
Then assuming you wanted the...
Hi p45cal
Thank you for looking at the file for me.
I haven't yet had the opportunity to see what you have done, but I thought I would post a quick reply to say thank you.
You are correct, the data is a direct dump from an accounting package.
Cheers
Shaun
Hi All
I have some data which I am trying to chart which is spread across 3 revenue centres:
Property Sales
Project Sales
Property Management
Each of which has a series of associated costs.
What I am trying to do is create a dynamic chart which is dynamic in relation:
Months Charted -...
Hi David
I just opened the file in Excel 2003 and the drop downs have disappeared. I suspect it has failed as the drop downs are referenced to a second sheet and 2003 does not like that.
Cheers
Shaun
Hi Narayan
Thank you for your explanation of the use of functions, that makes complete sense.
In relation to declaring the variables objWord and objDoc I will implement and test that tonight.
Cheers
Shaun
Hi Hui
I need to pull the subroutine out because as the code stands it is too long and produces the error "procedure too long".
Those three lines of code are repeated throughout the code many many times, so there is an opportunity to put them in their own subroutine, shortening the length of...
Hi Hui
Here is the code that I am working on. I hope it helps you see my problem.
The example code works for me also when:
objdoc.Characters.Last.Select
objWord.Selection.InsertParagraphAfter
objdoc.Characters.Last.Select
is left in place, but when I pull these three lines out into...
Hi Hui
Thank you for taking a look.
I need condense the script because I am getting another error...procedure too long.
These three lines of code get run many times so I thought I could pull them out of the main code to condense and hopefully fix the procedure too long error.
The files...
Hi Hui
When I run:
Function FnAddTables()
'Apply styling to text
objDoc.Bookmarks.Add ("ClientName1")
Clientname1 = ActiveWorkbook.Sheets("Sheet1").Range("C3")
With objDoc
If objDoc.Bookmarks.Exists("ClientName1") Then
.Bookmarks("ClientName1").Range.Text = Clientname1...
Hi Everyone
I am getting an run-time error when a my function then looks at a sub.
Would any be kind enough to please take a look, I have been unable to resolve?
Cheers
Shaun
hmmm...possibly some progress.
Am I correct in thinking bullet points are really just a type of styling and if I create a bullet "style" then I can apply that style as I have done here (from Chandoo Example.xlsm):
If objDoc.Bookmarks.Exists("ClientName1") Then...
Hi All
There is an issue with code in the xlsm (besides the bullet point section) this file corrects that issue.
Hopefully someone may get the opportunity to take a look, I just can't get this to work. Any assistance would be greatly appreciated.
Cheers
Shaun
Hi Narayan
I have spent the last few days trying to get bullet points to work.
I am not sure what I am doing wrong, would you kindly please take a look?
Cheers
Hi Narayan
Thank you very much for your help. Your code worked perfectly!
I don't understand why my code was behaving the way it was, or more importantly why yours works correctly.
Cheers
Hi Narayan
When a table is being added to the word document it is deleting everything else in the document. I don't understand what is happening.
Are you able to please take a look?
Kind regards
Hi Narayan
Thank you so much.
When I amended the line accordingly, I received an error, but when I changed "Heading 1" to -2 it worked perfectly.
Kind regards
Shaun
Hi Narayan
Please find attached example xlsx and docx files.
To answer your question, visually the text that I would like to apply the formatting is selected. Beyond that I am unsure.
Kind regards
Shaun