Default View Of VB Windows
Feb 18, 2010Having trouble setting VB windows views back to deafult ...
View 14 RepliesHaving trouble setting VB windows views back to deafult ...
View 14 RepliesWe have only just converted to Windows 7 from Windows 2000 and can't find the option to reset default colours. In Windows 2000 it is in: tools/options/colour.
View 2 Replies View RelatedEach time I click on an Excel file the worksheet will open up within an existing Excel worksheet that I have open. This is frustrating when you are working with two monitors or screens (laptop screen and additional monitor) and want to view each worksheet separately in separate screens. What I end up doing, which is not efficient, is I'll open the second worksheet which will open up in an existing worksheet that I have open and then I'll close it, and then launch a separate Excel worksheet and pull open the recent file and I'll have two open worksheets (not within same Excel worksheet I already have open). This allows me to grab and pull one worksheet in a separate screen and leave the other as I need both open on two monitors.
Question: is there a way to default Excel when opening or double clicking an Excel file to automatically open in a separate instance of Excel and not in an existing open worksheet?
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
how to create and add password to a default windows zip file using vba excel macro.
View 2 Replies View RelatedI have an excel document with about 7 worksheets in it. The users of these worksheets can save the document but they never save it with the page view starting from the top. How can i ensure that whenever this document is open the default view for all the contained worksheets is at the top (ie:cell a1).
View 2 Replies View RelatedExcel 2007 - need to adjust protected view settings but the protected view tab is missing from my Trust Centre settings - have the following tabs - trusted publisher / location, add-ins, activeX, macro, message bar, external content and privacy options. Document is a revenue authority download and without being able to adjust the protected view settings, can't input data.
View 3 Replies View RelatedI 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.
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
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................................
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
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 RelatedI'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] .....
I found this code on the web for hiding the windows taskbar.
View 14 Replies View RelatedI 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?
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 RelatedIm 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?
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)............
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.
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...
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 RelatedI'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 RelatedI 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
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.
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 RelatedYou 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 :
I'm very much in a bit of a pickle. I have updated my operating system from vista to windows 7 and a macro no longer works. The old code is
View 4 Replies View RelatedThe 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.
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
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.