In my workbook, I copy the current sheet to keep as a record of a sale. Eventually, the workbook fills up with sales and at some point throws an error when I try to copy another sheet. After saving, then completely exiting Excel, then reloading the file, I can continue without problems. I'm guessing it's a memory issue, but I'm not qu...
Hey all,
I am currently porting a legacy VBA application to a .Net application. During this process the users of the existing VBA application need to have some features added. So instead of coding them in VBA & then later in C#, I’ve wrote the new functionality in C# and I want to expose this to the existing VBA application through COM, ...
in a if statement, how do i match a positive number with a negative one
e.g. if 500 match with -500, cut and paste
one solution i thought of is changing one of the column by *-1 before i do anything but...
Is there anyway i could rephase the below if statement to match a positive cell and a negative cell?
Dim sh1 As Worksheet, sh2 As...
Hello everybody,
I have a simple question regarding PowerPoint VBA:
Which VBA code should I use to switch between the "active sheet of paper" (I am sorry I don't know how to name it properly), in which I am doing something with the object(s), and the file (or "field", again sorry for my poor terminology) where all the slides are ?
Fo...
I have two Excel sheets. The first one has some data. The second has updated data and should be used to alter specific information on the first sheet.
For example: If I had (in the first sheet) employee wage and his number and in the second sheet also. I want to write code that will find the employee number in the second sheet and chang...
We have built an Excel 2003 template that asks the user to select an XML file which is then imported into an XML Map and used to populate a worksheet.
Unfortunately it turns out that the users have Excel Standard Edition, which does not include the XML import functionality - namely the Workbook.XmlImport function.
Users are able to ope...
Hello everybody.
There is one thing I want to do in PowerPoint VBA.
I want to create two dots in the main window - dot A and dot B - by their given coordinates: for example, A (232, 464) and B (109, 567). I don't know how to do it in PowerPoint VBA. I know how to create a simple straight line. I use this macro code for that:
Sub Crea...
I have a form with a few buttons. I want create a button which will execute all the buttons one after the other, after each function of the buttons has completed. Also, I would like to change the colour of the buttons to show which button is being executed.
How do I do this?
...
As far as I know, the code below gets a shape from the active window, nudges it a bit, copies the slide and pastes it right after the current one, then turns the pasted slide into an active window, and nudges it again:
Sub Test()
' Get the active presentation
Dim oPresentation As Presentation
Set oPresentation = ActivePresentation
...
For software used in a call centre guiding agents through a set script they must follow while on telephone calls, with the script branching dependant on answers to questions given - My system uses a MS Access / VBA front end (isnt web based due to speed, phone integration), 'call scripting' is coded in VBA when needed, but what if i want...
As far as I understand, this code "grabs" only the first shape in the active window and nudges it:
Set oShape = oSlide.Shapes(1)
oShape.Left = oShape.Left + 5
How can I "grab" all the shapes in the window and nudge them all at once?
...
I have created an Excel Spreadsheet which helps with data analysis from an Oracle database.
The user enters then clicks the "Refresh Query" button which generates a query for Oracle to execute. The query takes a minute or so to complete. Although the VBA code does not hang on ".Refresh", all Excel windows remain frozen until the que...
Here is some math code that adds A to B:
Sub math()
A = 23
B = 2
ABSumTotal = A + B
strMsg = "The answer is " & "$" & ABSumTotal & "."
MsgBox strMsg
End Sub
But how can I calculate a square root of ABSumTotal?
Is it possible in PowerPoint VBA?
...
In VBA for PowerPoint, as far as I understand, this code gets only the first shape in the active window and nudges it:
Set oShape = oSlide.Shapes(1)
oShape.Left = oShape.Left + 5
And if I wanted to nudge all the shapes, I would use a loop for this.
But how can I get and nudge only certain shapes, based on their number?
For exampl...
I feel I lack some real basics and I feel I would waste your time if ask all those basic questions here. Can you please recommend a good PowerPoint VBA tutorial that would explain basics to me. A tutorial povided with examples is prefered.
...
Does anyone know what the future holds for VBA/VSTO programming in PowerPoint? I've been working on a Office automation project and find it frustrating to work with PowerPoint in particular since it seems to be one level below VBA support found in Excel or Word.
It feels like MS is trying to phase out support for VBA in PowerPointsinc...
I have a form/subform for inputting data into an ado table. The main form's recordset is a local table of Widgets and information about the widgets (WidgetID, WidgetName, size, color, location, etc). I am inputting test data (multiple tests per widget, all with unique dates) through the subform which is connected to an ADO recordset to...
I have a simple Excel file that queries a database when it opens and then closes automatically.
If I double click the file to open it from within Windows Explorer (I'm running Windows XP and Excel 2002), it works fine.
However, if I run it using Excel "C:\DataUpdate.xls" from Start > Run or from Shell within another instance of Exc...
I am trying to hide specific columns in an Access 2007 split form through code. I need the form to check certain conditions to see whether it needs to display a column or not. I have code in the form's 'Activate' event to hide the column like this:
txtControl.ColumnHidden = True
This code works in the "Open" event, but if I hide the c...
From one of VBA tutorials I learned that variables contining numbers should be firstly declared as integers:
Dim mynumber as integer
But, please, look at this code:
Sub math()
A = 23
B = 2
ABSumTotal = A + B
strMsg = "The answer is " & "$" & ABSumTotal & "."
MsgBox strMsg
strMsg = "The answer is " & "$" & Sqr(AB...