Adding Browse Feature To Auto-prompt Box

Oct 15, 2007

I am using the following coding on my s/sheet at the moment...


Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Dim r As Range
Application.EnableEvents = False
For Each r In Target
If Trim(Len(r.Value)) = 1 Then r.Value = UCase(r.Value)
Next
Application.EnableEvents = True
If Selection.Count = 1 Then
If Target.Row > 3 And Target.Column > 14 And Target.Column < 19 And Target.Value = "Y" Then
MY_LINK = InputBox("As you have entered 'Y' into this cell, please provide a link to the document. If there are no documents available for linking, please click cancel and change the value of the cell to 'N'.", "Document Link Request")
ActiveSheet.Hyperlinks.Add Anchor:=Range(Target.Address), Address:=MY_LINK
End If
End If
End Sub
The top code is to change all singular small letters to caps... and the second is to bring up an "enter hyperlink" box when "Y" is typed into a particular cell...

Can anyone edit this 2nd code to include a "browse" button, so that when entering the hyperlink, it can be to a file on the computer?

View 9 Replies


ADVERTISEMENT

Prompt To Browse Folder

Mar 21, 2008

Is there a way to incorporate a prompt that allows the user to browse a folder. The code I am using is below but 'myDir' will change each month.

Sub CombineWorkbooks()
Dim myDir As String, fn As String
Dim WSName As String
Dim WB As Excel.Workbook
WSName = "Summary"
On Error Goto Nxt
'turn off screen refresh for speed
Application.DisplayAlerts = False
Application. ScreenUpdating = False
myDir = "C:Users\DocumentsUsersWendyNew Folder"
fn = Dir(myDir & "*.xls")

View 7 Replies View Related

Macro To Prompt Where To Browse For The File

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

Macro Including User Prompt Feature

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

Turn Auto-Date Feature Off Possible

Aug 9, 2007

I am working w/ values that are interpreted as dates by Excel. The issue is that as I change it through code and have it displayed as I need it, I have to move it around to other locations w/in current sheet or to other sheets it gets reformatted to a date or serial number.

way to disable this feature as akin to turning off auto-correct feature. But have not found any method to do so. Can this be done in code?

View 9 Replies View Related

Auto-complete Feature Cell Drop Down

Jun 1, 2007

I found this code for an auto-complete function from this website: [url]
It works well, but see the web example before using it. You have to name a range MyList with your potential values for it to work.

Currently, you have to click the drop-down arrows to see the potential entries. I want to make it so that after the user enters the first 3 characters it will automatically "drop-down" and show the potential entries. This will save a trip to the mouse and let the user see whether their entry is in the system.

Option Explicit

Dim i As Long

Sub KeyEventOn()
For i = 65 To 90
Application.OnKey "{" & i & "}", "'MyValidation """ & i & """'"
Next
End Sub

View 4 Replies View Related

Auto Adding To A Cell?

Jul 7, 2014

Is it possible to have the following simple formula =D3-D13 with the answer in D20, this works fine but I also want D20 to be amended if, say D9 has a number added to it. For example, if the answer to my formula is 20 (in D20) and I then want it to change to 25 by putting 5 into D9. How can it be done?

View 1 Replies View Related

Adding A Row In One Sheet Will Auto Add To Another

Jun 11, 2009

I am currently working with a very detailed cost sheet that I have created in excel. To keep this description short... I ran out of columns after 6 months and had to create a new tab for the next 6 months. Basically, I have copied and pasted the first six months to the new tab and QC'd all the formulas and all that.. What I am foreseeing happen, as I've seen this in the past, is this cost sheet is a dynamic thing that will require the addition of rows for more line items.

My question is this, is there a way to "link" the two tabs so that if I added a row to the one sheet, it will automatically add a row to the 'linked' sheet in the exact same position with the same formatting?

View 9 Replies View Related

Adding A Letter To Auto Increment

Jun 6, 2014

There is likely an easy fix for this, but I have an auto increment with the following code and would like the letter R to precede the auto increment number everytime.

My current code is this:

Private Sub Workbook_Open()
Sheets("Receipt").Range("F11").Value = Sheets("Receipt").Range("F11").Value + 1
End Sub

View 7 Replies View Related

Adding Attachment To Auto Send VBA?

Jul 30, 2013

I have a VBA script below that auto sends emails from excel. I tried to make this add an excel attachment from a specific location.

Sub SendEm()

Sheets("Template").Select
Dim i As Integer, Mail_Object, Email_Subject, o As Variant, lr As Long
lr = Cells(Rows.Count, "A").End(xlUp).Row[code]....

View 5 Replies View Related

Adding Cell Information Into Auto Email

Nov 17, 2009

look at the script im running in the attached spreadsheet. It auto generates an email to the email address in c so long as column H has a yes in it. However there are things i would like to change. I would like it to say: contact xxx to discuss your outstanding resource center loan titled: {then put the title of the load in here - column E} which was due back on {then put due back date here column G}.

View 4 Replies View Related

Adding An Auto Filter On Specific Columns Of A Worksheet..?

Dec 14, 2007

How do I go about using adding an auto filter on specific columns of a worksheet..?

I.e. I want to auto filter column "D", "G" and "I" but none of the columns in-between ("E", "F" and "H")

Currently I can only create the filter for one column or a group of columns that are next to each other)

View 9 Replies View Related

Browse For Folder In Mac

Feb 27, 2007

I have created a browse button in excel and assigned a macro which will ask the user for folder. I figured it out for windows using Windows API Functions as mentioned at http://www.cpearson.com/excel/BrowseFolder.htm. However cannot get it to work for a Mac.

View 2 Replies View Related

Browse For Filepath From Userform

Aug 7, 2013

Upon clicking a button in a userform, I would like a MsgBox to appear, allowing the user to browse their file directory.

Upon selecting a folder in the file directory, a new excel workbook is created with the filepath chosen and named based on a previous MsgBox (which ive already accomplished), and the filepath is recorded in a cell on Thisworkbook.

Is this possible and if so how?

View 1 Replies View Related

Browse To Attach The File

Oct 29, 2007

send automaticaly, or it waits until user will push button send or brows to attach the file.

In all given samples it says: “If you use Microsoft Outlook”. I know that any office has Outlook. Is it impossible to make Outlook usable with macro and then send an e-mail?

View 9 Replies View Related

Browse For File User Input

Sep 3, 2009

Does VBA support any type of "browse for file" interface? I'm thinking something similar to an inputbox, but instead it gives you the standard looking windows explorer window to find a file (think adding an attachment in outlook).
The function would return a string.

View 2 Replies View Related

Browse For Worksheet And Running Macro

Oct 23, 2009

I am trying to create a program that will allow the user to browse for an excel worksheet and execute a macro that will format the worksheet with a click of a button.

Here is an image of what I want the template to look like:
Picture 2.jpg

Now I need to know what language I should use and the codes to make it run.

View 6 Replies View Related

VB Shell Command To Browse Files

Oct 15, 2008

I'm in the process of building a user form that required the user to brows for a file, the path of the file that they select is then displayed in the textbox next to the "browse" button in my form. I also have another button next to this which when selected will open the file that is displayed in the textbox previously mentioned.

I’ve been trying the shell command but with no success, I can get the user form to open adobe reader but whenever I try to include that file path for which to open the file I keep getting runtime errors,

Below are a couple of examples that I’ve tried (you'll prob be able to guess from the code that I’m very new to VB in excel).

For additional info the value in the textbox would be something like, "H:My DocumentsPDF Filesmyfile.pdf"

Dim GetFile As String
Shell "C:Program FilesAdobeReader 8.0ReaderAcroRd32.exe", vbNormalFocus
'this opens adobe reader but I'm trying to open a specific file

Shell "C:Program FilesAdobeReader 8.0ReaderAcroRd32.exe" & textbox9.value, vbNormalFocus
This produces the runtime error again

Dim GetFile As String
GetFile = TextBox9.Value
Shell "C:Program FilesAdobeReader 8.0ReaderAcroRd32.exe" & GetFile, vbNormalFocus
'this produced a runtime error - to be honest this was an attempt born out of frustration.

View 9 Replies View Related

Browse To Insert Picture & Size It

Dec 14, 2007

I Have Inspection Reports To Do
And They Come In With One Big Text Srting
I Haveused Formuee To Seperate Them And A Macro To Put Them On Seperate Sheets.but...

I Want To Insert A Picture (for More Indepth Reports)
Rather Than Inserting A Picture Can I Do A Macro That When It Is Run It Opens Up A Browser, Similar To The One In Insert Picture And Then Insert A Picture After The Bottom Cell And Resize It So It Will Be The Same Every Time? But At The Bottom Of The Last Line Of Data.

View 7 Replies View Related

Find The [Browse] Button To Attach A Post?

Mar 31, 2009

I am trying to attach an Excel file to a post. I found the following in FAQ: "To attach a file to a new post, simply click the [Browse] button at the bottom of the post composition page, and locate the file that you want to attach from your local hard drive" But I cannot find the [Browse] button. I should have said "to attach a file" not "to attach a post" in the header.

View 2 Replies View Related

Browse For Picture File And Put Location In Cell

Sep 30, 2009

I am trying to code where when someone hits the command button it will popup with the browse form and they find the location of the file and it puts there choice in a cell. don't know if it matters but the location would always be a picture. Here is what I have but it shows -1 in the cell

HTML Dim strFilePath As Variant
strFilePath = Application.FileDialog(msoFileDialogFolderPicker).Show
shUserInformation.Range("D12").Value = strFilePath

View 3 Replies View Related

Excel 2010 :: Browse Only Visible Sheets

Jul 28, 2012

I am using Excel 2010.

I found code from the internet attributed to Bob Phillips for VBA to have a dialog box pop up and allow the user to select what worksheet to navigate to.

The code works well except it doesn't exclude hidden or very hidden worksheets.

Code:

Sub BrowseSheets()
Const nPerColumn As Long = 38 'number of items per column
Const nWidth As Long = 13 'width of each letter
Const nHeight As Long = 18 'height of each row
Const sID As String = "___SheetGoto" 'name of dialog sheet
Const kCaption As String = " Select worksheet to goto"
'dialog caption

[Code]....

I know there is the line of "If Sheets(i).Visible And i Mod nPerColumn = 1 Then..." but it still allows all sheets to show up in the dialog box.

How it can be modified to include visible sheets only?

View 9 Replies View Related

Inserting Browse Button In Form Control?

Nov 29, 2012

Is it possible to use a Form control which choose a folder/file in a specific location (Ie: Browse button)?

Currently I put the location details in a textbox.

View 1 Replies View Related

Browse For Folder / Index Files And Subfolders?

May 12, 2014

I found some code that works well to index a folder and all sub-folders for file names.

The issue is that the folder used is coded in an excel spreadsheet (cell C7) in the below code and whether to look in sub-folders (cell C8 - True or False).

Code:
Sub ListFiles()
iRow = 11
Call ListMyFiles(Range("C7"), Range("C8"))

[Code]....

I have tried to incorporate the browse for folder and select if sub-folders are used, but it isn't working.

View 1 Replies View Related

Browse Directory, Open Specified Filenames Then Close

May 5, 2006

I have done a search in the forum, and there are many results on browsing directory and opening files, but they are not what I have in mind.

What I have is different folders for different months (e.g. “January”, “February’, “March” and so on), and in each folder I have the same file names (e.g., in “January” folder, I have files called A, B, C. In “February”, I also have files A, B, C but these are different from the files in other folders)

Basically I need a macro which can open a specific list of files.

So first step, the user should be able to browse the directory, then select a folder (no need to open, not sure if it makes any difference though). I need the user to be able to select different folders because the macro should work for the different months in different years.

For this, I have found this
Function GetFolderPath() As String
Dim oShell As Object
Set oShell = CreateObject("Shell.Application"). _
BrowseForFolder(0, "Please select folder", 0, "c:\")
If Not oShell Is Nothing Then
GetFolderPath = oShell.Items.Item.Path
Else
GetFolderPath = vbNullString
End If
Set oShell = Nothing
End Function...........

View 9 Replies View Related

Date(Y,M,D) 'feature'

Nov 16, 2005

In the Date function if you take 31/03/2007 and add 1 month to it:

=DATE(YEAR(ref),MONTH(ref)+1,DAY(ref))

you get 01/05/2007, which really isn't 1 month later. Bug or feature?

View 10 Replies View Related

Way To Disable Help Feature

May 22, 2009

I just want to know if there is anyway to disable the help feature in Microsoft Excel?

I have to administer some exams.

View 9 Replies View Related

Autosum Feature In VBA

Jun 10, 2006

Here is what I am looking for:

I have several groups of data separated by a couple of blank lines. For each group of data I would like to sum the rows in column F. I do not want to use the subtotal feature but rather the autosum feature for each section. It is important that the formula is actually entered so if I add additional rows of data the formula will keep calculating. So at the end of each data the formula is as follows =sum()

View 5 Replies View Related

Weeknum Feature

Jun 20, 2006

Does VB have the WEEKNUM feature ?, I can use WEEKNUM in an Excel sheet ok, but it is not recognised in VB ... I have installed both the Analysis tool packs, the one for VB as well.

View 8 Replies View Related

Browse Folder Dialog - Show Msgbox If Nothing Selected

May 19, 2014

I'm having some trouble showing a messagebox if the user presses OK but doesn't select a folder using msoFileDialogFolderPicker.

[Code] .....

The 2 MsgBox's I've added show the same string, yet the If Not InStr line returns true regardless if ":" is in the string or not.

View 2 Replies View Related







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