vba

Execute SQL SP in Excel VBA

HI I am having problem with getting all the columns back when i execute following code in excel vba. I only get 6 out of 23 columns back. Connection, command etc works fine (i can see exec command in the SQL Profiler), data headers are created for all 23 columns but i only get data for 6 column. Side Note: it's not prod level code, h...

VBA excel macro

I have this VBA macro in Excel. When a user clicks on a button on the sheet the macro returns the results to the sheet. What i would like to ask,is how can i run more than one query (that returns different results) in the same sheet,using the below code? Sub Stats2() Workbooks("macro.xls").Sheets("Sheet3").Select ActiveSheet.Range(...

Naming Slide Images on Export in PowerPoint 2007

Presentation.Export(filename, "PNG", sizeX, sizeY); creates thumbnail images of all slides in the PowerPoint presentation. My problem is that the thumbnail filenames change according to the Language of PowerPoint. On an English PowerPoint, the thumbnail files are: "slide1.png", "slide2.png", etc. On Hebrew PowerPoint: שקופית1.png, שקו...

Outlook VBA - Get Details Of Current Active (Or Open) Email

I am completely stuck as to how to retrieve details of an email which is either currently selected or open. In fact, I can't find any details on how to access an email. It seems you can traverse the entire folder structure and get all emails, but that doesn't really help me. I don't suppose I can get some pointers? And yes, I hate VB...

Macro for one-to-many splitting of Word documents

I have a Word document which is several hundred pages long. I would like to use a macro to automatically create about a dozen or so sub-documents based on certain rules (mainly, occurrence of certain strings in each Section). Is this possible? What VBA functions should I read-up on? Does anybody know of any code examples which are even...

MS-Access: hotkey to display a message box

I need particular users the ability to lock a record on a form, but I don't need anything too serious such as setting different security settings. Idea: I would like to be able to have a certain keydown combination (ex: ctrl+alt+M) to open a message box. (I'm trying to avoid making a small form because all I need returned is either yes...

Script to start subscribers synchronizing

When I want to force an update of the subscribers to my merge replication publication, I can go into the Replication Monitor, right click on the subscription, and choose Start Synchronizing. I'd like to be able to script this (using vba/vbscript or a command line). I'd also like users to be able to run the script (what permissions woul...

Open website in Outlook's internal browser via VBA

I'm looking to open a given webpage via VBA. I can do this using: Set browser = CreateObject("InternetExplorer.Application") browser.Navigate ("http://google.com") but this opens an instance of IE. I'd like to open it in Outlooks integrated browser window. I'd presume this is fairly easy, but I'm not familiar with VBA and googling...

runing the macro automaticaly to all exsisting and new documents

I have macro that create the footer with author and date, but I need this macro to automaticaly run to all word document (exsisting and the new document) just I open the word file which I saved before or the new one so there we find in document the macro that I create ...

How do I sign an XLA (Excel add in)?

And is is possible to do that from code? ...

How to get the size of a range in Excel

Hello, Using VBA, is it possible to get the size of a given range in terms of pixels or units? (I don't care which unit as I am only using it to relate to other measurements with the same unit). Thanks. ...

How do I get the Outlook VBA "FreeBusy" method to return the truth?

I've got a simple bit of Outlook VBA which looks up the FreeBusy status of a number of meeting rooms to determine whether or not they are free. In the last couple of days, the following code: sResult = olRecipient.FreeBusy(olCurrentItem.Start, 15, True) causes incomplete FreeBusy information to be returned, often all zero's. If I th...

SharePoint site space usage

Hello all, I would like to find out how much space my group's SharePoint site uses (files + version history). However, I only have administrative access to my site, not the entire SharePoint instance, so I have to come up with my own solution. I'm interested in the total, but usage per individual file is also fine. I've googled everyt...

How to create a fixed blocked (FB) file for IBM mainframe/FTP in VBA

I've got VBA code that generates a text file with some pretty basic information included. I then upload that file via FTP. I got a message from the server admin of the IBM mainframe today that my file was in variable blocking (VB) format and their job process uses a fixed blocking (FB) up to a max size of 256. How is this done? Durin...

Why does a task in VBA get executed before an earlier one has finished?

As VBA-novice I'm having trouble understanding some VBA behaviour. I got the following code, which reads rows from a db into an activex control, and thereafter tries to put these values into an array. the vxdata1 activex is proprietary, no insight there - but basicly it cares for the ADO connection, executing of an SQL command and putti...

Microsoft Access VBA to edit SQL queries

Hi guys, I have an Access database with a single query in it. I can currently copy the query via VBA, using DoCmd.CopyObject . However, I need to be able to edit the SQL in each instance of the query individually. All the examples I have seen however, involve recordset, which is something I am not using. Any ideas? With thanks, Will ...

Generate Reports from Ms Access 2007 Using Queries automatically via VBA

Hi Everyone, I have a few queries which need to be exported into a report and I want this to be done automatically each time the database is opened. I'm guessing this would be possible using VBA to which i dont have much knowledge off. Can anyone help with this please? Thank You ...

Is there any good reason to continue writing VBA + Access Forms applications?

I was recently asked to update an old Access Forms application. Coming from a .NET background, I found the change frightening, and became somewhat uncomfortable. I had assumed these were legacy technologies, fast becoming anachronisms... Am I wrong? If so, what are the reasons to continue using this technology (besides avoiding the cos...

Help me automate a procedure in excel

I have an excel sheet with values in columns A, B and C like this: A B C 1 8.22 1.99902 32.48974 2 8.22 3.04698 33.92426 3 8.22 2.26374 33.1547 4 8.22 2.78227 33.2593 6 8.22 2.46798 33.34269 6 8.22 2.57802 33.67131 7 8.22 2.46798 32.7427 8 8.22 2.57802 33.07131 There is also a ce...

VBA macro : conditional column fill

Hello Everyone : I have been wrestling with this since yesterday but gotten nowhere,was hoping someone could show me the light I have this workbook in which I have the following 2 requirements : 1)if the user enters a value(which is a date) in column A : the value of '2' is automatically filled in column C 2) a- if the user enters ...