Open Windows

Mar 29, 2007

i'm having trouble with the following code. The first if statement works fine, it's on the second pass that get problems, i get a 'ERROR 13 type mismatch' on the Windows(NewFN).activate line and i cannot figure out why.

Private Sub cmdsave_Click()
Dim NewFN As String

Range("B5:G21").Select
Selection.Copy

If Module3.firstTime = "y" Then
NewFN = worksheets "Recalculate").Range "G5").Value
".xls"
Workbooks.Add

View 7 Replies


ADVERTISEMENT

How To Open Two Windows Of Excel

Jan 24, 2014

Every time I open a new file in excel it opens up the file and the other file I have open disappears. Can I open a file so that there will be two separate windows?

View 3 Replies View Related

Cant Open Spreadsheets From Windows

Oct 1, 2008

I've had a new machine, and for some reason if i try and open excel files by double-clicking on a .xls file, excel tries to open each part of the filename individually!!!!

For eg, if i have a file called week 1 report.xls, and i double click that, it gives me 3 messages saying:

cant find c:filepathweek.xls
cant find 1.xls
cant find report.xls

I can get round it by going into excel first, and opening the files from there but it's a right head-doer!!!

I'm on windows XP, and using excel 2003 to open the files...

View 9 Replies View Related

Open My Computer In Windows Explorer

Nov 19, 2009

The following 3 macros do the following.

1st macro . . . When the button is clicked for this macro, Windows Explorer is opened and the folder MyMenuFiles is selected. Works Fine.

2nd macro . . . When this button is clicked, the windows explorer opens with My Documents selected. Works Fine.

3rd macro . . . THIS IS THE PROBLEM ONE. When this button is clicked, windows explorer opens, with the C: drive selected. I want My Computer selected.

View 3 Replies View Related

Close ALL Open Windows Folders

Jul 10, 2012

I use the below code to close ALL open Internet Explorer pages. Im trying to adapt this to close ALL Windows Explorer Folders.

Dim Shell As Object
Dim IE As Object
Dim i As Variant
Set Shell = CreateObject("Shell.Application")
i = Shell.Windows.Count
On Error Resume Next
Do While i > 0
i = i - 1
Set IE = Shell.Windows(i)
If TypeName(IE.Document) = "HTMLDocument" Then IE.Quit

Loop

View 3 Replies View Related

How To Open A Folder In Windows Explorer

Apr 5, 2007

I'm sure this is really easy, but I'm learning and not having luck in the search option for previous posts. Thanks for your patience in advance.

I want to open a windows explorer window by using a button in Excel.

View 9 Replies View Related

Allow User To Choose From List Of Open Windows?

Mar 27, 2009

I have a few macros that need to work with various worksheets which are in different windows.

1. Make the user name the files a certain way for consistency
2. Make the user type the name of each window at the start of execution

I was wondering if there was a more flexible option though: one which would allow the user to choose from a list of open windows (similar to the Window>More Windows>Activate function in Excel).

Ideally the macro would run and say something like, "Which of the following open windows contains dataset1?" "Which of the following open windows contains dataset2?"

View 2 Replies View Related

Adding Folder To 'Open' And 'Save As' Windows

Aug 28, 2009

I had this set up in Excel 2003, but our main shared drive just went down and after remapping this link didn't work. How do I do this in Excel 2007?

I want a folder to show up on the left hand side of the "Open' and 'Save As' windows under My computer, desktop, My Documents, etc.

View 2 Replies View Related

Excel Macro - Open Windows Explorer Window Using VBA?

Jun 6, 2002

What's the code for opening a Windows Explorer window from within an Excel Macro?

View 7 Replies View Related

Open Windows File Chooser At Default Location

Feb 14, 2012

Is there any way of making the default directory location for application.getopenfilename work properly with shared locations?

Presently I use ChDrive then Chdir but I cant use ChDrive if workbook is opened from a link in email for example. Please see below

I have a VBA routine that asks the user to load an existing file on startup.

I want the window for the file selection to open at the same folder every time. (the folder is on a shared drive)

The workbook to run the code will always be located on this same share at a fixed location.

My present code builds the path to the desired opening folder by collecting the drive letter from the current working directory (which has to be done as everybody maps there shares to different letters here, its not guaranteed to be the same! )

then i ChDrive to this letter.

Then I ChDir to letter plus myKnowndirPath

This works fine, the window always opens at my required folder. But only as long as the user has navigated to the folder containing the spreadsheet and then ran it from there. Because that way a drive letter is available.

However i found that if i sent a link to the workbook or its home folder. And the user opens the link or a windows explorer from that link and then runs file from there.

Then it stops working beacause there is no local drive letter in the working directory path. i.e. working directory shows as

'network \shareddrive
ootafolderanother arget

instead of something like
J:afolderanother arget

View 2 Replies View Related

Minimize Windows And Allow Other Excel Work Books To Open

Apr 30, 2012

I have created a userform template and is working fine, the problem is the users are not able to minimize the template nor open any other excel files.

How to allow the template to open any other excel files or macro enabled files and also to minimize the windows.

View 1 Replies View Related

Save All Open Excel Windows After Respective Cell Names

Feb 17, 2009

I am trying to do something which is very slow and manual. What i have is like a seperate spreadsheet from every day and have to save each one down manually in the respective date. so for example column C has the date in already. Can you tell me how to save all the excel workbooks which are open (if i open them all) and then use the date in column C (which is in the format 20090217) and save it as a xls in the format 170209 and then close the workbooks?

sorry this is a huge question, just takes me so long to save them all.

View 10 Replies View Related

2 Instances Of 2007 Slow To Open A File By Double-clicking And Entering From Windows Explorer

Sep 20, 2007

i use excel 2007, it s slow to open a file by double-clicking and entering from windows explorer, by googling i fould a fix by adding "%1" at the end of command in "Application used to perform action" (folder options/file types/xls/advance/open). however, to open files in the same instance, i have to keep "DDE message" with [open("%1")]. With both "%1", excel now opens twice.
How to fix it?

View 3 Replies View Related

Keep UserForm On Top Of All Other Windows?

Sep 9, 2013

I used to think my excel skills were OK until I started working with userforms but I now realise that I have a long way to go.

I need to enter data from various WEB sites onto a worksheet and at the moment I'm toggling between each web site and the worksheet. What I would like to do is set up a userform which I can enter data from each page into and when finished hit a commandbutton to transfer it to the worksheet.

I'm mostly OK with creating the userform but not sure what code, and where I need to add it, to keep the userform on top of all other windows.

Also not sure if it's possible, I have another worksheet that has a series of hyperlinks that when selected open a web page, I can create a combobox that shows the the display names of the hyperlinks but not sure what code I need to add a commandbutton or some other control that will open the hyperlink.

View 5 Replies View Related

Scrolling Of Several Windows

Nov 6, 2007

way of getting two sheets to scroll together, so when I scroll one window the other one moves too? Some text editors have that future (IIRC UltraEdit does)

I can't find a scroll event in the windows code to trigger a macro to run itself.

I can get around it by using a selection change event which would restrict me to moving around with the cursor keys/Pageup/down, but I've got 15,000 to review regularly in a short space of time and it would be quicker by mouse

View 9 Replies View Related

Vba Works In Windows But Not In Os X

Jan 16, 2007

I have put together the following code and it works fine on my PC. However, we are a mainly Mac based company and I nead it to work with a Mac. I am using the Actual ODBC Driver for Mac to give me a ODBC connection. I can do the query in excel but setting it up as a macro just will not work.

Sub Sales_Query()
Columns("C:D").Select
Selection.Delete Shift:=xlToLeft
Range("B2").Select
Dim area As Variant
area = Range("B2")
With ActiveSheet.QueryTables.Add(Connection:= Array("ODBC;DSN=my_database;Description=My................................

View 2 Replies View Related

PDF Macro Works With Windows But Not On Mac

May 18, 2014

I've sent the file to 2 different windows computers and it works fine, but doesn't work with the two macs that I've sent it to.

This is the code:

[Code] .....

View 2 Replies View Related

Hide The Windows Taskbar

Oct 28, 2007

I found this code on the web for hiding the windows taskbar.

View 14 Replies View Related

Create New File In Windows

Jun 10, 2009

I am looking for the best way to create a new file in windows. I am just looking to create a save filename template. After I run a macro, a graph is created and printed to pdf. I want this macro to create a filename, so that when the save as dialog box opens, I just have to doubleclick the existing filename. Then I save the excel workbook as another.

For example, after I run the macro, the pdf printer will open up a save as dialog to c: emp. I want to have this macro create two files there, one DaveGraph.PDF and one DaveExcel.xls. They really won't be files, just names. They can be 0kb files. I want it to be as efficient as possible. I know I could create a new workbook and save it there with the correct name, but isn't there an easier way?

View 2 Replies View Related

Run Workbook When Windows Start?

Nov 15, 2009

Is there any way of running particlular excel workbook when Windows start? Like when Windows XP or Vista start, excel workbook (Vehicle Maintenance) will run automatically? Not so sure if can use VBA or edit registry system which I would'nt like to touch at work.

View 2 Replies View Related

Default View Of VB Windows

Feb 18, 2010

Having trouble setting VB windows views back to deafult ...

View 14 Replies View Related

Switch Between New Instance Windows?

Nov 15, 2011

Im having trouble switching between windows that are open in separate instances of excel.

I used to be able to switch easily between these workbooks when they were both being being run in the same instance of excel.

But since having to change it so the workbooks are opened in seperate instances, i cannot get it to work, the code just fails when it trys to activate the first window.

I currently have the below code:

Code:

Sub CloseAndSave()
Application.EnableEvents = True
'//Activate InfoHub workbook and put a tick in the checkbox.
Workbooks("403 InfoHub.xls").Activate
Sheets("HOME PAGE").ToggleButton1.Value = True

[Code]..

Is there anyway to do this?

View 1 Replies View Related

Windows.activate Not Working...

Dec 11, 2006

I have the below VBA code that I'm working on where I run it after I already have a workbook entitled BRNewBusiness121106.xls (or whatever day it is when I'm running the code) that's open, and the code opens another workbook, BR-MasterAccounts.xls and then does some work between the two workbooks.
The code is stopping with a "subscript out of range" error at this line:
Windows("BRNewBusiness" & Format(Date, "mm/dd/yy") & ".xls").Activate

Why is it doing this? What change do I need to make so the code will activate that already-open workbook?

david
--------------------------

Sub testAfterDAKCSupload()
'
Application.DisplayAlerts = False

MsgBox "new code follows...deskcheck before putting into production"
'edit the below remaining steps to get working properly

Workbooks.Open filename:= _
"D:B HNewBusinessReconciliationB H-MasterAccounts.xls"

'Sheets("summaries").Range("B7").PasteSpecial (xlValues)............

View 9 Replies View Related

Housekeeping For Code Windows

Aug 6, 2007

I have just messed up my explorer window and can't get it back the way it was.

I currently have three windows showing, Project, Properties and Code. Previously the windows were all linked so that if I widened the code window, the other two would become narrower. If I made the Project window taller, the Proerties window would automatically reduce in height.

My three windows are now totally independant of each other.

View 9 Replies View Related

Windows Program Installer

Nov 10, 2006

I downloaded a workbook at one time and it actually installed the workbook as if it were an actual program on my computer. I would go to Start-All Programs-and it was listed there. I thought this was very cool. Is something like this done through excel/vba or was a third party application used in conjucnction. I know some of Dave's evaluation workbooks are setup this way, but I can't remeber which one.

View 3 Replies View Related

Get Windows Color Scheme

Jul 15, 2007

I'm trying to pick up the Excel application color scheme setting from code. What I want to do is set a VB.Net COM add-in form's skin based on the application color scheme so that my Add-In matches the users color settings blue/silver/black. Where is the application color scheme setting stored? I have searched the registry but with no luck and the Excel 2007 setting isn't picked up when I record a macro...

View 3 Replies View Related

SendKeys In Windows Vista

May 31, 2008

I used to run a macro on Win XP - where in I open a Web browser and then Send keystroke to Open new ones - Which was working fine. But now when i use the same macro in Vista it gives me a "Error - 70 : Permission Denied" @ sendkeys.

Option Explicit
Public myIE As Object
Sub OpenIE()
Set myIE = CreateObject("InternetExplorer.Application")
myIE.Navigate "www.ozgrid.com"
myIE.Visible = True
Application.Wait (Now + TimeSerial(0, 0, 5))
SendKeys "^N" ' to Open New Window
End Sub

What i require now is I need to Open IE - 7 - Which i am able to do and then open several Tabs with different URL's

View 5 Replies View Related

Run Macro With Windows Task Scheduler?

Apr 29, 2014

Ive been looking at a bunch of examples, but everything that I have tried just gives me errors. what code to use to make a vbs script to run in windows task scheduler that will...

Open "J:GroupsBSHEETSSDANew EOD.xlsm"
Run the macro named "EODPrint"

Save the workbook

and close the workbook

Leaving excel open if other instances exist.

View 9 Replies View Related

Activate Windows Or Workbook Functions

Jul 22, 2009

I have .xls files (ex: a.xls, b.xls etc) in a shared drive.How do I get information (run macros without changing anything) from a.xls and create a new file in my hard drive without opening a.xls. I don’t know if that is possible to do. May be sounds very weird. For example, I name this file on my hard drive as a01.xls, b01.xls from b.xls. Now I run other macros from a01.xls. which is active. I want this macros to run independent of the file name the user creates. In otherwords the workbook has to be variable. Not sure how to use ‘Thisworkbook’ function if that is what is needed to do.

View 12 Replies View Related

Record Windows Paint Coordinate

Aug 14, 2009

You know when you open a picture using windows paint,
there's a coordinate on the bottom right of the screen right?

Now, Is it possible to make a macro that records the coordinate everytime i maka a dot using "pencil" feature in paint?

So everytime i click on a spot in the image (draw a single dot), excel would track the coordinates of these dots and write it vertically in 2 columns (x & y)... the result is something like this :

View 14 Replies View Related







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