Application.SendKeys Stopped Working

Aug 17, 2007

I have a simple macro that from Outlook Express sends emails, with the last code line to mimic ALT+S on the keyboard to send the message

Application.Wait (Now + TimeValue("0:00:02"))
Application.SendKeys "%s"

Yesterday I needed to install some new software that required at the end reinstalling of Microsoft Redistributable 2005. Not sure if for that reason but now the last line (the SendKeys) is not sending the email automatically anymore. What happens is:
-the email message windows pops up but is not being sent unless i do it manually (if i get rid of the two seconds pause ahead of that)
-have a VB error message that takes me before the SendKeys line (if I keep the two secs wait ahead of that)

It looks to me that either:
-the pc is not active anymore on the email message therefore the SendKeys doesnt work
-somehow the instruction finds the "door" shut by something else
-worse of all, the software has messed up with those send keys commands (tried to reinstall it but to no avail)

View 13 Replies


ADVERTISEMENT

Print Macro W. Application.SendKeys

Jan 9, 2008

I was looking at Colo's website for the Application.SendKeys method, http://puremis.net/excel/code/039.shtml ,so that I can speed up a page/print setup macro that I have.

I was partially successful in setting this up, but I did notice that there was no argument number in that method for setting up the "Fit to x Pages Wide" and "y Pages tall".... I really need that functionality....

I saw something here that is supposed to get the zoomfactor : http://groups.google.com/group/micro...8d0?scoring=d& but I can't seem to incorporate it into my code so that it works.

Is there an Argument I can set up to get those?

Here is my code so far:

Sub ElecECNPrint()
Application.SendKeys "{ENTER}", False
Application.Dialogs(xlDialogPageSetup).Show _
Arg1:="", _
Arg2:="", _
Arg3:=0.25, _
Arg4:=0.2, _
Arg5:=0.42, _
Arg6:=0.39, _
Arg11:=xlPortrait, _
Arg12:=xlPaperLetter, _
Arg13:=79, _
Arg17:=600
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
End Sub

I want to change Arg13:=79 to Arg13:= Zoomfactor, but I just ain't cutting it as each page is a different size and I am running this from Personal.xls ....

View 9 Replies View Related

SendKeys No Working

Jan 4, 2010

Once the intended chain of actions is performed, normally EXCEL would go on to display the contextual menu, (which is its standard right-click action when no macros are involved).
Since I don’t want my macro operation to end with that menu covering part of my screen, I have the macro ‘type’ in ESCAPE, through one of these lines:

View 14 Replies View Related

Sendkeys Not Working

Dec 19, 2006

I'm trying to access one of my custom menus through a macro.

The keyboard commands are

alt, n, f

and

alt, n, g

I have these lines of
Range("A31").Select

SendKeys "%nf", True
SendKeys "%ng", True

All this seems to do is put the letters f and g in cell A31!

View 9 Replies View Related

Debug F8 Stopped Working

Jun 22, 2008

I recently got a new laptop. I now have excel 2007 and vista. The debug step key, F8, does not work. It toggles out of excel when pushed. If I start the procedure in the debug menu, the SHIFT - F8 will step through though. Is there a setting I am missing? It must have somehting to do with VISTA since in the debug section it says to use F8.

View 3 Replies View Related

Keyboard Stopped Working In Excel

Apr 18, 2012

I have been working on a workbook, and all of a sudden, my keyboard no longer worked in Excel. No shortcuts, no CTRL+C, no CTRL+V, no CTRL+S, no CTRL+A, no F12 to save, no letters, no numbers.... The only button that is working is my ALT key, and I use the other letter keys just fine to navigate after pressing ALT.... But that's it!

I have still been able to work on it because I can still write in Word, and I can still write more code in the Visual Basic window, and I can still click the buttons I create under the Developer... but it's still frustrating to not be able to type a thing in any of the cells, formula bar, or be able to use any of the shortcuts. And now when I tried to close it, I can still select everything else, and I can close this workbook, but it won't close Excel.

View 3 Replies View Related

2007 Macros Have Stopped Working

Dec 14, 2007

All my macros have suddenly started crashing Excel 2007 when I try to run any one of them. I can record a new macro but even that newly recorded macro will crash Excel.

Service Pack 1 was downloaded and installed by Windows Update two days ago and I had successfully run macros after SP1 was installed.

Today, it's a no go and I'm at a loss as to what may have caused this problem. I have not installed any software lately, other than the Windows updates on patch Tuesday.

This is on a Vista Home Premium machine.

When I try to run a macro, Excel crashes with this info:

View 11 Replies View Related

Macros Have Suddenly Stopped Working

Jan 16, 2012

why my Macros have suddenly stopped working for no apparent reason?

For Example - one macro would run when a Cell in Column A was selcted. It would trigger a macro to save the workbook.

I'm not giving details of what the specific macros do as it's more of a question as to why macros in a workbook just suddenly cease to function.

View 4 Replies View Related

Days360 Function Has Stopped Working?

Feb 25, 2014

I use this formula in a depreciation schedule to determine months in service.

=ROUND(((DAYS360(G12,$Y$1,FALSE)/30)),0)

G12 is my start date and $Y$1 my end date. Every month I update this to the current period end date and up until now, it has recalculated.

Today, I changed $Y$1 from 1/31/2014 to 2/28/2014. The cells with that didn't update. For giggles, I entered in previous dates, and it worked fine.

Is it because 2/28/14 is a future date? I tried 2/24/14 with no joy...

View 1 Replies View Related

Autofilter Code Stopped Working

Feb 20, 2007

What could make this line of code stop working. It has worked for weeks, and just yesterday it stopped working. :x

ActiveWorkbook.Sheets("Email").UsedRange.AutoFilter Field:=2
The sheet is unprotected, and events are enabled. I don't know of anything different than before. What do I look for that would not allow this code to run?

View 9 Replies View Related

Formulas Referencing Cells Stopped Working

Aug 11, 2009

I made a spread sheet last year that used various COUNTIF formulas that referenced other cells. =COUNTIF(I40:ER40,"A") It worked perfect.

I copied that spreadsheet to use for this year. I cannot get this formula to work. I have reentered in various locations and forms, but to no avail. If I enter the data and then enter the formula, it works.

However, if I enter the formula first and then enter the data (which I will do over the course of the year) it does not work. I even tried to reconstruct all of this in a brand new spread sheet and it still is not working, although last year's spread sheet still works.

View 3 Replies View Related

Microsoft Excel Stopped Working Error

May 15, 2014

I have a Macro button in my Excel Spreadsheet, every time I close the spreadsheet it gives me this error "Microsoft Excel Stopped Working" .

I have attached Spreadsheet to show example : Inventory List.xlsm‎

View 2 Replies View Related

Macro Has Stopped Working After Date Change

Dec 1, 2009

When the date changed today it stopped working and I cant see why as i have altered the dates that it looks at.

View 4 Replies View Related

Excel 2003 :: Auto Filter Stopped Working?

Sep 12, 2013

I've got a spread sheet at work that is shared between 4 people. It's password protected and its been protected so only four of us can edit it. It was working fine until yesterday for no reason the auto filter stopped working. The drop down arrows are still there but nothing happens when you click on them?

The sheet was made on excel 2003 but one of the users uses the newer excel which we will all eventually get.

View 2 Replies View Related

VLookup Stopped Working Unless Hit Enter While Cursor Is In Formula Bar

Aug 3, 2012

This vlookup has been in this workbook for years. All of a sudden any of the cells that have formulas won't work without placing the cursor after the formula in the bar and hitting enter.

It is keeping a marco from running correctly.

View 2 Replies View Related

Excel 2010 :: Stopped Working When Building Charts?

Jan 15, 2013

I'm working on a macro that does the following:

1. Pull data from the internet
2. Perform calculations on the data
3. Graph the calculated values

- As I run the macro, Excel dies in step 3, where I graph the calculated values.
- It works about 5% of the time and gives me the "Excel has stopped working" error 95% of the time - I can't isolate any difference in the attempts
- I've located the area in the macro where it dies, but I can't identify the exact line since it seems to shift around in this area
- It works perfectly fine when I step through using F8
- I've attempted DoEvents and Application.Wait to debug. Application.Wait for 5 seconds allows the macro to work about 50% of the time and increases in efficiency the longer I wait
- Steps 1 and 2 work perfectly fine (I've used that code in many macros), so I'm pretty sure the issue is in the below code:

I'm running Windows 7, Office 2010

Code:
'Chart variables
Sheets("Summary").Select
Dim ChartRange As Range

[Code]....

View 4 Replies View Related

VBA Lost Access To IE And Stopped Working - Runtime 438 Error

Feb 17, 2013

I'm scraping a website for some data using the following program. The program was working as expected until I decided to add a save file element that was a copy paste of some code a friend gave me (attached below). Funny thing is the save file functionality works but now I can't get IE to load the webpage - I get a 438 Error. I'm thinking there's a problem with something in the references menu.

Code:
Sub GET_PVI()
Dim Days_in_Month(1 To 12) As Integer
Dim Name As String

[Code]....

View 2 Replies View Related

Code Stopped Working - Can No Longer Copy And Save Worksheet

Jul 31, 2012

I have been working on this application for the past couple weeks and I have this module of code that copy's a worksheet into a new workbook and changes everything into values. However I have added buttons onto this sheet and after running the code again it froze the program, in which I had to manually end. It gave an error afterwards however I don't remember what it said. Now everything I try to run or step through it, nothing happens. And I have turned Events and ScreenUpdating on.

I would also like to note that it won't allow me to perform actions like unhide sheets or unprotect them. The code has not been changed either so what has happened to disable all functionality.

[URL] .....

View 1 Replies View Related

VBA / Code Stopped Working - Can No Longer Copy And Save A Worksheet

Jul 30, 2012

I have been working on this application for the past couple weeks and I have this module of code that copy's a worksheet into a new workbook and changes everything into values. However I have added buttons onto this sheet and after running the code again it froze the program, in which I had to manually end. It gave an error afterwards however I don't remember what it said. Now everything I try to run or step through it, nothing happens. I have turned Events and ScreenUpdating on.

View 2 Replies View Related

Errors - Microsoft Excel Has Stopped Working - Crash In Pivot Table

Jun 10, 2013

I have created several reports containing pivot charts with slicers, pivot tables and data sets. Total file size is around 5MB. Need to do an update in my pivot table Like adding an additional grouping on one of my dimensions. As soon as I start doing so the Microsoft Excel stopped working error message pops up and my file crashes! Removing existing groupings seems for some reason to be impossible as well: nothing happens when I do this. Ahow to solve this without having to rebuild all my reports?

View 1 Replies View Related

Cut / Copy / Format Painter Stopped Working (Don't Have Skype Click To Call)

Aug 23, 2013

When I copy or cut, I usually get a dashed border around the cells I have copied (or cut), I can then right-click somewhere to paste, but at some point in time recently this functionality has stopped working. The format painter doesn't work either - the paintbrush icon stays pressed for about half a second, then just goes away and I can't paste my formatting.

An operation I often do in excel is to copy a date from one cell, then highlight a few cells elsewhere and press enter to paste the date into them. I also like to right click on a row and Cut, then past it further down my list to re-order things, but this won't work either.

I don't know what I've done to make it go away. If I restart my computer and open a workbook, then I can copy/paste at least once (maybe a few times) then it stops again.

This is caused by a Skype 'click to call' function, but I don't have that installed here. I have actually just tried installing it, so I could run through the uninstall (thinking there might be debris from something previously), but it made no difference.

View 2 Replies View Related

Application.DisplayAlerts Not Working

Jan 14, 2010

I am trying to suppress the message box displayed while executing the macro.

View 2 Replies View Related

Excel For Mac, Application.FileSearch Not Working

Nov 3, 2009

This relates to Excel for Mac 2004

I'm trying to use Application.FileSearch in a procedure to open files in a folder one by one and then do some stuff. It works fine when I developed it on my Windows machine but won't work on the Mac platform. The culprit instruction seems to be the

Application.FileSearch instruction, and I've also tried what I think may be a Mac equivalent Application.FileFind, but I get the 'Object doesn't support this action' error.

So I wrote a simple procedure below just to test the .FileSearch instruction but this fails in the same way.

Any ideas anyone? I've commented out lines which relate to Windows syntax.

View 12 Replies View Related

Change To An Existing And Working Application

Nov 4, 2007

I am trying to make a change to an existing and working application. Right now, I read in a list of clients from my spreadsheet to my Userform. When the user (that's me as well) clicks on a name, (or names) the software takes over and does stuff with their biweekly payments. What I want to do is this: Not only show the names, but also the biweekly payments next to the names. The reason for this is some clients send in more than the assumed biweekly payment. As a first start, I changed my Initial function to read in two columns from my spreadsheet and not just one. The range name listbox_rwosource is d100:e112.

This is the only change I made. However, when I run the program - I still only see the names?

Public Sub InitMyUF()
Dim I As Integer
'UserForm1.ListBox1.RowSource = "current_clients"

View 9 Replies View Related

Application.ScreenUpdating = False Not Working

Jan 22, 2009

For some reason Application.ScreenUpdating = False has stopped working for me.

For testing purposes, I have freshly opened Excel (2003 SP3) and into the brand new workbook, added the following macro:

*****************
Sub Test()
Application.ScreenUpdating = False
For i = 1 To 40
ActiveCell = i
ActiveCell.Offset(1, 0).Select
Next i
End Sub
*****************

When I run this macro, I see the individual values being written on the screen.
Stepping through the code and using Watch, I can see that Screenupdating is set to False by the first line, but as soon as the Activecell is changed, Screenupdating is reset to True.

If I turn events off by adding Application.EnableEvents = false to the start of the macro, all works as expected, however I do not want to use this "workaround" as I use event driven macros.

View 9 Replies View Related

Application.ScreenUpdating = False Not Working??

Jul 18, 2006

I've got a listbox which populates a second listbox from cells on a hidden worksheet which is done through macros. Every time I select a value in the listbox, the screen " flickers" to the hidden worksheet. I want to be able to do the whole process without that "flickering". I tried using Application.ScreenUpdating = False, but it still flickers. Have I overlooked something?

Sub GetStaffteamQuery()
Application.Calculation = xlCalculationManual
Dim sConnParams, sSQL As String
Dim dbFile, dbPath, dbName As String
ThisWorkbook.Activate
Sheet3.Select
dbFile = "CounsellorData.mdb"
dbName = "CounsellorData"
dbPath = Sheet3.Range("databaselocation").Value
selectedgroup = Sheet3.ListBox1.Value
If VBA.Right(dbPath, 1) <> "" Then
' if last char in dbPath has no slash.................

View 4 Replies View Related

Application.filesearch Not Working In Excel 2007

Dec 20, 2009

I wrote a macro to list all the excel files from a directory and its sub-directories to an excel sheet. It is working in excel 2003 but shows error (object does not support this action) in 2007. Actually I have copied almost this entire macro from excel 2007 help only. Can somebody modify this to use in both the versions of excel?

View 6 Replies View Related

Excel 2010 :: Application Visible And Display Alerts Not Working

Nov 23, 2011

I am trying to hide the excel 2010 application, open a csv file on a network drive, show the excel application.

The problem is a "Downloading" progress indicator appears, during the workbook open event I assume.

Code:
Sub Macro1 ()
Application.Visible = False
Application.DisplayAlerts = False
Workbooks.Open Filename:="S:LOGT5.CSV"
Application.Visible = True
Application.DisplayAlerts = True

I have seen the similar progress indicator during the "Save" event too. How to hide this?

View 3 Replies View Related

Api Instead Sendkeys

May 17, 2009

this is the code i'm using but sometimes it runs sometimes it runs incorrectly; i've been told that sendkeys is not a good choice and i should use API but i'm just studying VB6 and i do not know what is API; so i need a code to copy and paste in a module this is the code with sendkeys that i need insterad with API

Sub b()
Shell "C:Program FilesEquisThe DownLoaderDlwin", vbMinimizedFocus
SendKeys "%{T}", Wait:=True
SendKeys "{o}", Wait:=True
SendKeys "{A}", Wait:=True
SendKeys "{DOWN}", Wait:=True
SendKeys "{TAB}", Wait:=True
SendKeys "C:Documents and SettingsfrancoDesktop", Wait:=True
SendKeys "{TAB}", Wait:=True
SendKeys "matrice1.txt", Wait:=True...............

View 8 Replies View Related

Application.DisplayAlerts Freezes Application

Jul 14, 2006

Im copying and pasting data from one workbook to another but when I want to close the source workbook, it comes up with this message that I have much data and if I want to keep this in a clipboard. I thought I could disable this with Application.DisplayAlerts = False but when I do this, Excel freezes. Im I doing something wrong. How can I supress this window?

Public path As String
Sub Get_data()
path = "\Nlchoosa.nlOPS_Processes$OPS_ProcessesReports Sector performance"
Workbooks.Open Filename:=path & "ReportsSector Performance Reporting week.xls"
Range("A1").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.copy
Windows("Sector Performance report Week.xls").Activate
ActiveSheet.Paste
Application.DisplayClipboardWindow = False
Windows("Sector Performance Reporting week.xls").Activate
Application.DisplayAlerts = False
End Sub

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved