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 have a sample spreadsheet (uploaded to this thread) in which I have 10 command buttons named 'Video 1' to 'Video 10'. Next to these buttons is a Windows Media Player Object. I require the code that upon clicking any of the video command buttons, the relevant video is opened and shown in the windows media object within the same sheet (sheet1).
I'm sure the code for each button will be the same apart from the cmd button reference number/name and the link to the file to be played.
If we assume all the videos are called as per their buttons i.e. Video 1.wmv, Video 2.wmv ... Video 10.wmv; and the location of these files is under 'C:Films', can someone post up some code for button 'Video 1' making it clear which variables to change for linking to the different files.
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.
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?
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?
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.
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
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
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:
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.
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...
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
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"
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.
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 :
We 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.
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
I have 2 workbooks open and I want to set up formulas from one linking to the other. When I toggle on the task bar between the 2 workbooks they replace each other within the same window so I can only see one workbook at a time. How do I set it up so I can have 2 separate windows open at the same time, one with each workbook in it? I tried 'side by side' in one window but the viewing area is too small.