Macro To Pull Up Hyperlink Prompt
Mar 15, 2013
I'm trying to create a macro that I can assign to a clip art pic that will pop up the Insert Hyperlink prompt when I click on the picture. So basically anytime I click on the pic for the 1st time I'd like to be able enter the url address of my choosing but if I were to click on that pic again I want it to go to the Hyperlink address I previously entered.
I should note that I tried recording a macro by first by clicking on Record Macro then press ctrl + k and then click Stop Recording but it wouldn't stop recording. I had to first click Cancel on the Insert Hyperlink prompt and then I was able to Stop Recording so this attempt was unsuccessful.
View 2 Replies
ADVERTISEMENT
May 2, 2008
I need a macro which collects data from two files and dumps it into a separate spreadsheet. I need it to prompt the user to select the two files, since the file names may change.
Once a user selects the files, the macro simply opens them, grabs the data (the data sits on a single sheet in each file) and pastes it into a file, and closes the 2 data files.
The Data sits in A7:N20 on both files.
View 14 Replies
View Related
Oct 8, 2009
I'm building a spreadsheet that consolidates multiple worksheets into one. I've got that portion done, but what i need help with is a user prompt. I don't have an example at the moment, but it should be fairly straight forward.
Rather than consolidating all the data into one worksheet I want to consolidate only the rows that contain certain information. The column I need to query in each worksheet is "BL". The only thing is that column won't always contain the same data. Is there a way to do basically a prompt to where it searches for the data they want and if it isn't in there it just moves on to the next worksheet automatically?
View 9 Replies
View Related
Aug 6, 2007
I have a column filled with about 300+ hyperlinks.. however they all have display text. I need to get the actual hyperlink address from every link in the column and paste them into the adjacent column (or any other column will do).
I know you can use hyperlinks(1).address to get the address out of one, and I have been able to do this, but I am new to VBA and having trouble working out how to loop through the whole column and put the addresses in another.. all i have done so far is to debug.print all the addresses!...
For Each c In Range("H:H")
Debug.Print (c.Hyperlinks(1).Address)
Next c
How could I modify this to print the hyperlink each time round into column I?
View 5 Replies
View Related
Jul 21, 2014
excel macros and only know how to record certain tasks, and then edit after recording the task.
I am working on a project to automate a daily routine task for a company which involves creating a new tab and inputting various datas.
How can I create a macro such that I create a new tab and a combobox appears asking me to input the date in a particular cell?
This is the first in a number of steps for fully automating this process.
So far I only have this to create a new tab.
------------------------
Sub Macro1()
'
' Macro1 Macro
'
'
ActiveSheet.Copy After:=ActiveSheet
End Sub
------------------------
View 1 Replies
View Related
Oct 12, 2009
I have a macro that performs an operation on all Excel files in a given folder. The only problem I had was I couldn't walk away until it was done because the files themselves had macros that gave me a Yes/No prompt to recalculate.
I already have a calculate command in my macro so how can I override this command without physically selecting and clicking "No" with my mouse and without editing the macros that are already in the files (each unique and embedded in the individual worksheets). I cant edit each file because there are close to 300 of them.
View 9 Replies
View Related
May 3, 2007
I need to put together a macro, which will be assigned to a command button, that will prompt the user for a pre-specified password, and, if the password is correct, return a pre-specified value in a different cell. Is there any way to do this?
To put it in perspective, at my company we have approval sheets that need to be signed by several executives that are scattered all over the building. The first executive gets the copy, signs it, sends it off, etc. They tend to dissappear on occasion, so we are looking to make it all electronic, where they can access the file in a shared folder, and the if they enter their password correctly, their initials are input into the specified cell. They can than save the file for the next executive to do the same.
View 5 Replies
View Related
Mar 23, 2014
I have a print button or object and I want to assign a macro to it that when clicked brings up a prompt to type in a Month or Year to Date and prints the data that corresponds to that month or YTD. I have a Date column in a table that I can get a different macro to print by basially having the macro filter by blanks, so essentially printing all the dates in the table, but I feel as if it could be much better and simpler by prompting the macro to filter by "x" Month and print.
View 3 Replies
View Related
Feb 11, 2009
I am trying to complete a toolbar that will lock and unlock all the sheets in a workbook. While I can set the password automatically I'd like to have the macro ask for the password instead of hardcoding it.
Here is the code I currently have and works so long as I have already set the password in the workbook to match what is in the macro
View 3 Replies
View Related
Aug 28, 2009
I have looked in books and online and can't seem to locate how to create a macro that opens a browse function. From Excel I would like to click a button to start a macro and have that macro prompt me where to browse for the file. There is a lot of other code that will go after this step (which I already have), so once I click to "open" a file I want the macro to continue.
View 6 Replies
View Related
Sep 4, 2009
I have several hundred workbooks with multiple worksheets(15-35) that I am trying to tidy up, so the data can be entered into a database. Its my first attempt at VBA and between the forum and macro recorder I made an attempt which is below. I just can't seem to get over the last part. I have searched the forum but can't seem to find any relevant information. I have a couple of questions.
1. I need to be able to run this macro over all the worksheets in the workbook, so how can I loop it? All the worksheets are named differently i.e. peoples names.
2. In my code I have inserted 4 columns. These columns will be the only thing common between all the worksheets. A1 to A30 = Week number, B1 to B30 = Shift Number, C1 to C30 = Supervisor number. Column D is blank. I'd like to be able to be prompted to enter these 3 numbers at the start if possible? Can this be done in such a way as you are only prompted the once and not on each worksheet? I picked 30 rows because the amount of rows in each worksheet varies but never exceeds this. The end of my code "Delete rows where cell B is blank" will delete any excess data where 30 rows of week numbers etc are not needed.
Sub CleanCost1_1()
'
' CleanCost1_1 Macro
' Macro recorded 04/09/2009
'
' Delete Job Card Sheet
Sheets("Job Card").Select
Application.DisplayAlerts = False
ActiveSheet.Delete
Application.DisplayAlerts = True
' Delete Master Sheet
View 9 Replies
View Related
Nov 20, 2006
I have a button. When pressed, it runs a macro. Instead, after pressing the button, I would like the user to confirm to run the macro and display some info about it. This is to make sure the user does not accidentally run the wrong macro (button). I just need a prompt box, with a line info, and the two choices YES and NO. If NO is selected, nothing happens. If YES is selected, macro continues.
View 6 Replies
View Related
Oct 5, 2007
I have created a macro, but running the macro will replace the data that are already in the cells. So what I would like to do is to have a pop-up window come up when clicking the macro button asking if you really would like to proceed
View 2 Replies
View Related
Jun 20, 2014
Macro to Run all tabs in a workbook and prompt a pop up asking about sheet protection for each tab, such as Select locked cells, and select unlocked cells.
View 8 Replies
View Related
Feb 26, 2009
I have created an Excel sheet that retrieves data from a ODBC source. I have created a macro using macro recorder to refresh the data by re-connecting to the database. However, the connection requires a password prompt and when the macro is run, you are still required to enter the password.
Is there anyway to make the macro so that the password is automatically entered and the user will just have to press a button to fully run the query update?
View 2 Replies
View Related
Dec 18, 2009
Looking to write a macro which includes a prompt to the user for use in Excel 2007.
Specifics....Have a workbook including many worksheets with a common layout. Would like to write a macro to copy specific defined ranges from one worksheet to another but within the macro it would prompt the user to type in the worksheet name to copy the ranges from.
Example....User is at worksheet C in the file containing worksheets A, B, C, and D. User starts the macro and a prompt comes up for the user to input the worksheet name to source the ranges from (in this example A). User types in "A" in a dialog box and the macros copy/pastes the contents from range B4:B35 and Z2:z20 from worksheet A into those same ranges in worksheet C.
View 5 Replies
View Related
Feb 22, 2014
In a workbook, I use a macro to extract a sheet and save it as xls.
What code should I use to prompt the user to define the location and name of the new file to be saved?
View 1 Replies
View Related
Nov 12, 2009
Macros are just not my strong suit. I can usually find my answers here but this one has me stumped. I have rewritten this thing everywhich way but loose and this is my latest version.
Sub SetProtect()
'
' protect Macro
' prompts for password protection
'
' Keyboard Shortcut: Ctrl+p
'
Dim Response As String
Dim Answer As Integer
SetProtect:
Response = InputBox("Enter password")
If Response = "safety2" Then.......
View 9 Replies
View Related
Jan 22, 2008
I am using VBA to create a weightloss calculator and everything is going fine ecept the Vbyesno boolean that will not allow me to delete the data that i want.
I used a macro to delete the information that i want to delete and i know it works because without the vbyesno, it works fine.
With the vbyes no, both yes and no do nothing when clicked and the yes no box just closes.
The macro code is stored in a private sub called "ClearAll"
My code is:
Private Sub Restart_Click()
Dim Response As Boolean
Response = MsgBox ("Are you sure",YbYesNo)
If Response = VbYes Then
Call ClearAll
End If
End Sub
What am i doing wrong?
I also want to make the no button the default, how do i do this in conjunction with the code above?
View 4 Replies
View Related
Dec 29, 2008
For a sheet that many non-expert users will use on different systems I need a macro that let's them save, print and send the results of their work. So I made a macro that makes a copy of only 1 sheet of the workbook and saves it with a given name to a given location. The problem is that I want a location prompt to ask the user where they want the file saved, while giving/suggesting them a fixed filename. A lot of different users will make and use their sheets so I need a certain naming policy to manage all the files. (date, location, etc)
View 4 Replies
View Related
Jun 19, 2013
I have got a protected sheet with macros, how can I ensure that users can only open the sheet as Macro enabled only otherwise the sheet would not open?
I understand that some users may have different Macro security settings?
View 1 Replies
View Related
Jul 22, 2013
I have a Macro which deletes a sheet called "Pre selection" with:
Sheets("Pre selection").Select
ActiveWindow.SelectedSheets.Delete
It asks me every time if I am sure and I have to click to continue. Is there any way to remove this prompt or set it to continue without my intervention?
View 3 Replies
View Related
May 10, 2007
I am looking to find a way and synthesize code that will prompt the user for text data when he/she clicks a radio button, then place that text data in a "Notes" worksheet within the same workbook. Given that there are multiple radio buttons, with options of "OK" and "attention needed" (it is a checklist of maintenance items), I also need to find a way to have each note listed sequentially in the notes worksheet. My questions: Is this possible using macros? Can you steer me in the right direction? (change event, inputbox, then what?)
View 3 Replies
View Related
Sep 9, 2013
Its been a while since I did this on 2003 and needing a pointer on 2007.
Just needing a simple macro that opens the relevant folder from a hardcoded path to allow the user to manually select the file to be used.
This file will then be used to copy from and paste to another file.
View 8 Replies
View Related
Jan 7, 2010
I have a column of numbers each have a 0. infront of them (example 0.2346
0.5698). I want to pull the number from the right until it hits the decimal sign. So for the two above the result would be 2346 and 5698
View 2 Replies
View Related
Dec 9, 2009
I am trying to put together a macro to pull data from one tab to another. The key here is that I want it to take the entire row.
Basically it will look something like this:
As someone goes down the rows of the checklist putting x's in the boxes that need one (there is a column set aside for that), that box will turn red.
That part is easy and done.
What I cant figure out how to do next is to automatically have a copy made of the row with the red cell and send them to another document.
View 13 Replies
View Related
Oct 18, 2004
I want to create a macro that will automatically pull data from the web by simply pressing a macro button. I assume that this would be an easy task if the data is from a website with a specific URL such as [URL]
However, there are times when someone must enter data into the web to pull a specific report that does not have a unique URL. Is there anyway to create data fields in excel that would allow an individual to type in specific information (name, report period, etc.), and then press a macro button that would go out to the web, enter the information automatically, and export it as an excel file. I realize that this is probably substatially more difficult than my first question.
View 9 Replies
View Related
Mar 19, 2007
Need to create a macro that pulls certain data of a certain varying limit to different sheets, e.g. I have a sheet titled 'Data Dump' which contains lots of information specific to certain models of a product. I would like two other worksheets, one called '1' and another called '2' to pull the following information:
Worksheet 1 should pull data in columns A, B and I (in data dump) based on whether column H in Data Dump is = 1 to the total of 100 (i.e. 100 rows of information. (here an if statement would pull 100 and include empty rows, I do not want empty rows). Worksheet 2 should pull data in columns A, B and I based on whether Column H in Data Dump is = 2 to the total of 50 (i.e. 50 rows of information.
View 2 Replies
View Related
Nov 29, 2011
I Have a workbook which consists of 50 worksheets and i use Edit query window to pull the data from oracle on all these sheets. We run this once in a month. I have to go to every sheet and execute this code which is time consuming and i have to change the date value everytime. macro that can execute this process at once and we should give the date only once.I use OLEDB driver to connect to oracle.
Attached is the Command line code.
Select protocol, patient, Page, (date_indexed) Indexed,(first_entry_date) FirstPass,( second_entry_date) SecondPass,trim( modified_date) modified, trim(CRF_ERROR_COMMENT) Comments from JJA38377_96_crf where date_indexed>='1-May-11' and date_indexed
View 2 Replies
View Related
May 25, 2012
macro listed below. Currenlty the macro pulls the last 12 months as long as the data that is pulled is current. However, if the data is 2 months old for example, it only pulls 10 months instead of 12. modify this macro so that it alway pulls the last 12 months. I'm assuming that the minimum date would have to be found first and then go backwards from there?
Code:
Dim PI As PivotItem
Dim d As Date
Dim Twelve As Date
[Code].....
View 6 Replies
View Related