Free Microsoft Excel 2013 Quick Reference

Cannot maximize an existing workbook in the excel main window.

I have an existing excel document to which, when opened from file covers half
the main excel window. There is no minimize, maximize or close button a
standard window should have. I cannot double-click the title bar to maximize
the window.

If anyone knows what the problem is or likely to be, I'll definitely like to
hear from you.


Post your answer or comment

comments powered by Disqus
I installed powerpoint from my Office 97 cd and now I can't open my existing
workbook in Excel 2003. Excel 2003 was installed on my new computer. I have
uninstalled Powerpoint from the Office 97 and did a system restore to the
time before this installation. I don't know how to retreive my workbook! "-(

Hi all Im trying to achieve the following:

Move the result of an autofilter query located on worksheet A to an existing and in the same book, worksheet "B"

the reason I cannot use a simple copy and paste macro is that my database is enormous and when I try to copy it all the error promt I get is :

Microsoft Excel cannot create or use the data range reference because it is too complex

When I execute the Workbooks.Open method - an existing workbook in the Excel
window vanishes. Does anyone know how to prevent this?

Steve

I have recently upgraded to Excel XP and when I open an existing workbook,
Excel opens but the workbook does not, I have to go to file-open-workbook
name and then the workbook opens. Any suggestions why it will not open when
directly clicked on.

Can not save an XL workbook in a secured folder.

My requirement is to give users the ability to open and save existing files in a folder but not add new files or delete existing files. I have thus set the following permissions to the folder and files:

First set NTFS permissions on the folder ONLY:

DENY create files / write data
DENY create folders / append data
DENY delete subfolders and files
DENY delete
ALLOW traverse folder /execute files
ALLOW list folder / read data
ALLOW read attributes
ALLOW read extended attributes
ALLOW read permissions

Secondly set NTFS permissions on all specific files ONLY:

DENY delete
ALLOW traverse folder /execute files
ALLOW list folder / read data
ALLOW read attributes
ALLOW read extended attributes
ALLOW create files / write data
ALLOW create folders / append data
ALLOW write attributes
ALLOW write extended attributes
ALLOW read permissions I checked the permissions using a text file and they work OK.

I have come across a problem. When using text files, the security works gr8. But when saving an existing XL workbook, I get the error:

Quote:Microsoft Office XL cannot access the file . There are several possible reasons:

* The filename or path does not exist.
* The file is being used by another program.
* The workbook you are trying to save has the same name as a currently open workbook.I've checked that the file and path are correct and that there are no other users or processes using the workbook.

I think this might have something to do with XL trying to save the workbook as a temporary file before deleting the original and renaming the temp to the same name as the original. I can not find anything in any of the event logs.

Can someone shed some light on this?

Folder is located on a Win2K3 SP2 server. Client is running XP SP2.

Hello,

I want to import a file (HTML-Table) into an existing workbook. Excell allows to import files but only in a new file. Is there a way via VBA to import it into an existing workbook in a sheet I specify.

Up to now I managed to get a file dialog to choose the file and to add a new sheet at the end of the workbook:

	VB:
	
SelectHtml = Application.GetOpenFilename("HTML Files (*.html),*.html", , "Select HTML-log files") 
If SelectHtml = "False" Then 
    Exit Sub 
End If 
WSCount = Worksheets.Count 
Worksheets.Add After:=Worksheets(WSCount) 

If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines
The data has now to be enterred in this sheet...

I'd be very gratefull for any help!

I am using a shell command to open a converted excel file with .exe extension:
file_nm = Range("file_name")   'this refers to a file name with .exe extension in a workbook cell

For Each wb In Workbooks
If wb.Name = file_nm Then
MsgBox ("The " & wb.Name & " is already open.")
Exit Sub
End If
Next

open_str = ActiveWorkbook.Path & "" & file_nm
Dim RetVal

RetVal = Shell(open_str, 1)

[COLOR=#333333][b][noparse]
[/noparse[/b][/COLOR]

The shell command opens the workbook in another instance of excel. Therefore searching for an open workbook of the same name to avoid opening the same workbook twice (as in the for Each loop above) doesn't work because the previously opened workbook is in another instance of excel.

I need either to have the shell command open the file in the same instance of excel (preferably), or else know how to look in another instance of excel to see if the workbook is already open.

Please help with example code.

Thanks,

Jerry Erwin

Hi all!
I'm trying to create an add-in for Excel which adds a command button in the Excel right click toolbar. When I click on that button it should open a internet explorer window with a google search based on the value of active cell. It should work on all workbooks.
My VBA skills are limited, so i just copy/paste code I found on internet.

I created a class module (class1):

	VB:
	
 Application 
Private Sub appevent_SheetBeforeRightClick(ByVal Sh As Object, ByVal Target As Range, Cancel As Boolean) 
    Dim cBut As CommandBarButton 
    On Error Resume Next 
    With Application 
        .CommandBars("Cell").Controls("Google Search").Delete 
        Set cBut = .CommandBars("Cell").Controls.Add(Temporary:=False) 
    End With 
     
    With cBut 
        .Caption = "Google Search" 
        .Style = msoButtonCaption 
        .OnAction = SearchGoogleIE 
    End With 
     
    On Error Goto 0 
     
End Sub 
 
Private Sub AppEvent_WorkbookBeforeClose(ByVal Wb As Workbook, Cancel As Boolean) 
    On Error Resume Next 
    With Application 
        .CommandBars("Cell").Controls("Google Search").Delete 
    End With 
    On Error Goto 0 
End Sub 

If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines
module (modApplication)

	VB:
	
 
Dim myAppEvent As New Class1 
Sub InitializeAppEvent() 
    Set myAppEvent.appevent = Application 
End Sub 

If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines
module (googleSearch)

	VB:
	
 SearchGoogleIE() 
    Dim ie As InternetExplorer 
     
    Set ie = New InternetExplorer 
    Dim query As String 
    query = ActiveCell.Value 
     'Search google
    ie.Navigate "http://www.google.com/search?hl=en&q=" & query & "&meta=" 
    ie.Visible = True 
    Set ie = Nothing 
End Sub 

If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines
Added also Microsoft Internet Controls to references.

Your help is welcome=)

Is there a way to apply "page setup" defaults to an existing workbook in
Excel? For instance, I frequently work with excel files that someone else
has generated, and in order for me to print them out, I have to go to "page
setup" and change the margins to .5 on each side, and I like to have the
footer = pathname & file, and generally like to set my pages to fit on 1 page
width & height. Is there an "easy" way to apply a default page set up format
to existing files (and worksheets in the files) that have data in them? Or do
I just have to change every worksheet in every file one by one?

Haven't seen Chip's etiquette posting recently, so....Chip, hope you don't
mind.
Gary Brown

Hints And Tips For New Posters In The Excel Newsgroups

Author: Chip Pearson,

Hello

Thanks for ur supports

I have a problem , i have to find in a excel sheet whether a partilcular column exist in the excel sheel or not by VBA code.

if that column name exist in the Excel file then i will use a condistional statement on the basis of results

Please tell me how to do this.

hi
i am trying to remove hyperlinks that are linked to objects in the excel workbook using vb.
the code that i am using is as follows:

If wSheet.Hyperlinks(i).Type <> 0 Then
wSheet.Hyperlinks(i).Delete
ObjExcel.Save
hashyperlinks = True
End If

this code does not remove hyperlinks from the organizational charts, flow charts, cycle diagrams, etc. it just removes hyperlinks from the images
can some1 pls help.

thanks in advance

Is there a way to copy a sheet in one Workbook to and Another Existing Workbook?

I have attachment two Workbooks to this thread.

The one entitled: Copy a Sheet to An Existing WorkbookI would like to copy any Sheet to Workbook "Create PowerPoint"I would like it to be the first sheet in the Workbook "Create PowerPoint"
The one entitle: Create PowerPointIt has three sheets that have data already in it

I have a main "front end" workbook that people will be opening to interact
with. Whenever this main workbook opens, I would like it to open another
"data" workbook in the BACKGROUND, so I can copy data back and forth between
them using various scripts. I don't want the front end user to be able to
see the data sheet, or (ideally) even know that it has been opened in the
background.

In the code for "ThisWorkbook" in the main front end workbook, I have:

Dim objApp As Excel.Application
Private Sub Workbook_Open()
Set objApp = CreateObject("Excel.Application")
objApp.Workbooks.Open ("X:pathtoData.xls")
objApp.Visible = False
End Sub

In the code for the main worksheet in the main front end workbook, I have:

Private Sub Worksheet_Change(ByVal Target As Range)
Dim DataSheet As Worksheet
Set DataSheet = objApp.Workbooks("Data.xls").Sheets(1)
[.....]
End Sub

So, with the code as I have shown above, I usually get an "Object
Expected" error on my Set Datasheet line, which makes me think it isn't
recognizing my public objApp variable that I declared in the code for
ThisWorkbook. Should I be declaring it differently?

If I simply remove the "objApp." prefix in that line, of course it says
subscript out of range. If I use a regular Worksheets.Open (instead of
creating a new app object), it brings the Data.xls workbook to the
foreground and I can't figure out how to hide it.... I want the opening of
the Data workbook to be stealthy and hidden, if that is at all possible....

Any help at all would be most appreciated. Thanks,

---G

I have a user who is trying to use <EDIT><MOVE OR COPY SHEET> to copy a sheet to an existing workbook. She has them in the same directory and has them both open, but when she tries to copy a sheet from either of them to the other, the only workbook listed in the "TO BOOK" drop down menu is the one she is in. NO other workbooks show up as an option for her to copy to. If you have any suggestions on why this would happen, please let me know. Thanks!

Haven't seen Chip's etiquette posting recently, so....Chip, hope you don't
mind.
Gary Brown

Hints And Tips For New Posters In The Excel Newsgroups

Author: Chip Pearson, chip@cpearson.com www.cpearson.com
© Copyright 1997,1998,1999, 2000, 2001, 2002 by Charles H. Pearson
Last Update: 19-May-2002

Introduction

The following are suggestions for people who are new to the Excel
newsgroups. These are suggestions and guidelines, not commandments. Use your
best judgment, and play nice. This list is maintained and posted more or less
monthly by Chip Pearson. Thanks to everyone who has made suggestions for the
list (you know who you are!). Send suggestions, comments, and questions (or
even compliments) to chip@cpearson.com

The List.....

1 Always tell us what versions of Excel and Windows you're using. We
don't want to give you a simple answer that works in XL2000 but won't work in
XL95.

2 Use an illustrative subject line. Don't put in a subject line like HELP
ME! or EXCEL question. Instead, say something like Trouble With Pivot
Tables In XL97. And remember, saying URGENT doesn't make it any more urgent
to anyone but you.

3 Post in the appropriate group. There are various microsoft.public.excel
groups, for charting, programming, etc. If your message isn't about VBA
programming, don't post to the programming group. Don't post to more than one
group, unless the question really applies to more than one group. The
"regulars" read all the Excel groups, so someone will read your message. It
won't be lost.

4 Don't ask more than one or two unrelated questions in the same post.
Of course, you may need to ask more than one question to address a single
issue. Generally, each post should deal with only one problem.

5 Include example data and formulas in your post. The more you tell us up
front, the easier it is for us to answer your questions. If your formulas
aren't giving the results you want, include the results you want to get, as
well as the results you're getting. Your post should include at least

some sample data,
the formula you're using now,
the result you're getting now,
an explanation of why your result isn't what you want, and
the result you want to get.
6 Remember, we don't know what you need, or expect, or what your
abbreviations mean. Please include as much detail as you can.

7 If you've already tried using some formulas or VBA, include what you've
already tried. You may be very close.

8 Be very specific when reporting error messages that you get. Don't say
"I get an error when I do this". Tell us the text of the error message.
Exactly what did you do to get the error? Was it generated by Excel, VBA, or
Windows? If it came from VBA, was it a compiler error, or a run-time error.
What line of code caused the error? Be specific. Details count.

9 Don't attach a workbook to your message. Click here for the reasons.

10 If you're following up to a previous post, you don't need to include
everything. Snip out what's not relevant. But do include what is relevant.
Some people may have missed the original post. (See #11 below)

11 When posting a follow-up to a post, put your new text at the top of
the message, above the cited text of previous messages. (See #10 above).
This makes it much easier to others to read the responses to a message that
has been posted.

12 Please post messages in "plain-text" format, without formatting. No
HTML. Generally speaking, we don't want to see the cool new stationery or
GIFs you've found.

13 Please don't email your questions directly to us. There are
(hopefully) many people on these newsgroups that will have the answer to your
question and you might be helping others who are having the same problem. If
you post to the group, you'll likely have an answer within a few hours
(sometimes even within a few minutes!).

14 Please don't ask us to email you directly because you can't get back
to the newsgroup to check. Some of us email all their responses to the
original posters, but generally you will find that we don't have the time to
email and post the answer. As one frequent contributor wrote, "Read it where
you post it."

16 We are not here to do your work (or your homework) for you. Before
posting a question or request for help, make sure you put in
time and effort yourself.

17 RTFM. That's what F1 is for. First try to find your answer in online
help (press F1 and go from there). Next try Microsoft online support and
Knowledge Base: http://support.microsoft.com If you are still stuck post
away.

18 Check the archives at Google (http://groups.google.com) before asking
a question. It may have been answered last week. Google archives every
newsgroup post ever made, so if it was asked here, you can find it there. If
you don't find it there, post away!

19 Take a look at the Comp.Apps.Spreadsheets FAQ
http://www.faqs.org/faqs/spreadsheets/faq/

20 Try it out. Before posting a question asking "Will this work?" or "Can
I do this in Excel?", try it out for yourself. You might be smarter than you
think.

21 "I posted a question an hour ago, but didn't get any responses. Should
I post it again?" No. It can take anywhere from a minute to a day for your
post to actually show up on the server. Then, someone has to read it and
come up with an answer. Give it a few days before thinking about resubmitting
a post.

22 "I posted a question last week, but didn't get any responses. Should I
post it again?" Well, maybe, maybe not. The regular responders to the
groups probably read your question, but had no idea what you were talking
about. If you didn't get any responses to a question, rewrite your question,
and include (more/better) sample data and formulas. Also, check Google to
make sure that the message actually did get posted.

23 "I posted a question, and no one emailed me an answer. Should I post
again?" No. You should not expect to get an email reply to your
question. Replies will show up in the newsgroup, not your email.

24 Be polite. Rudeness has never been a problem around here, and let's
keep it that way.

25 This is not the "I hate Microsoft" group. There are other newsgroups
for that.

26 The MS support and development people don't read these newsgroups (or
they do so covertly). This is not the forum in which to

complain about features that aren't available, or
suggest new ones.
The "regulars" here aren't MS employees, and we don't have Bill Gates'
secret email address. This is public, peer-to-peer support.

27 When declaring variables in VBA, use explicit declarations, with
explicit types. Sometimes errors arise from an improperly declared
variable in VBA. For example, use
Dim W As Workbook rather than
Dim W or
Dim W As Object

28 When including dates in example data, try to use a dd-mmm-yyyy format.
This will prevent confusion among international date styles.
For example, 09/02/98 means 2-Sept-98 to USAn users, but it means
9-Feb-98 to many (most?) European users. Using 2-Sept-98 leaves no
room for misunderstanding. If you're dealing with dates after 1999, use the
full 4 digit year.

29 Be careful using characters like "!" in the subject line of a post.
Some folks automatically filter out messages based on the subject line. A
subject like "Help Me !!!!" can be easily confused with a line like "Make
Money Now!!!".

30 Where do I get more on-line help? There are a number of very good
Excel sites on the Web. In my humble opinion, the best are:

John Walkenbach's http://www.j-walk.com/ss
Stephen Bullen's: http://www.oaltd.co.uk
Baarns Group (archive site): http://archive.baarns.com
Rob Bovey's AppsPro http://www.appspro.com
Frank Isaacs': http://www.vbapro.com
My own: http://www.cpearson.com
John Walkenbach's site has a very comprehensive list of links, so
you can find many other sites from there.

31 Learn to use the VBA debugger. Learn how to set breakpoints and to
examine the contents of variables. This skill can save you many, many
hours of frustration.

32 For best results, connect directly to the Microsoft news server:
msnews.microsoft.com . If you connect through your local ISP's news server,
your message may be dropped or may take a few days to show up on the MS
server. In your newsreader (e.g., Agent or Outlook Express), find the
"Tools" or "Options" menu, choose "Accounts" or something similar, and add a
new news account, pointing to msnews.microsoft.com .

33 Google and CNET Customers and other "web portal users".
Please remember that your questions are not answered by Google or CNET
users. Neither of these services provides any answers whatsoever. These
services simply forward your question to the public newsgroups, where other
people, wholly unconnected with Google or CNET answer your questions. All
Google and CNET really do is allow you to see advertising while you look for
answers written by others. Google and CNET do not provide any answers
themselves. The only thing they do is pass the questions on to us, and
splatter advertising across your screen. If this appeals to you, then that's
just wonderful. Just remember, when you ask a question on CNET or Google,
neither of these advertising services are giving you the answer.

34 Please use you're real name in your messages. And include your real
name in the body of your message. A nickname like "Kewl Guy" might seem cool
on AOL or CNet, but in the newsgroups, we're friendly and informal. Use
your real name.

35 Don't email me telling me that plural of "formula" is "formulae", not
"formulas". I already know this.

And Last But Not Least....

If we have helped you save some time, some hair pulling, some frustration,
or whatever... a quick "thank you" is always appreciated, either through
the newsgroup or directly by email. Remember that none of us are getting
paid to do this. We don't work for Microsoft; we do this to help the Excel
community and to help others grow (and to grow ourselves).

© Copyright 1997,1998,1999, 2000 by Charles H. Pearson
This document may be freely distributed in any form, as long as it remains
intact and unchanged, and is attributed to its source: Chip Pearson,
www.cpearson.com

--
Gary Brown
gary.DeleteThis2SendMeAnEmail.Brown@kinneson.com

Is there a way to apply "page setup" defaults to an existing workbook in
Excel? For instance, I frequently work with excel files that someone else
has generated, and in order for me to print them out, I have to go to "page
setup" and change the margins to .5 on each side, and I like to have the
footer = pathname & file, and generally like to set my pages to fit on 1 page
width & height. Is there an "easy" way to apply a default page set up format
to existing files (and worksheets in the files) that have data in them? Or do
I just have to change every worksheet in every file one by one?

Hey all,
I have a template that needs to prompt the user to open an existing workbook
and then be able to reference that workbook's worksheets in order to copy
various columns from worksheets in the template over to the existing workbook
that was just opened.
Can anyone offer the best way to do this?

Greetings from Guelph. I have searched the forum but have only found the END IF VBA command.
Is there a way to write an IF statement in the Excel user interface that will say"If condition A is true then perform action A, otherwise end the IF statement without doing anything else?"
In this case the IF statement checks a date value, and if the date value changes it writes a value from another cell, else it should do nothing.
Any suggestions would be greatly appreciated.

I have created a Excel Addin to review the Analtyical Reports in the Excel.

When the user is trying to get the data from the server he is getting an
error message though i am able to perform the operation successfully on my
env.
Error Message:
Run-time error '-2146233079 (80131509)':
The underlying connection was closed: The connection was closed unexpectedly.

As we clik on the ok button for the above error message pop-up, i am getting
an another error message with the following details.
It has two buttons defined on the pop-up:- Cancel and Continue.

Then this error message appeared:
Microsoft .NET Framework box:
Unhandled exception has occurred in a component in your application. If you
click Continue, the application will ignore this error and attempt to
continue.
Exception from HRESULT: 0x800A9C68

2a) Within the box there was a Details drop down:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Runtime.InteropServices.COMException (0x800A9C68): Exception from
HRESULT: 0x800A9C68
at Excel._Application.Run(Object Macro, Object Arg1, Object Arg2, Object
Arg3, Object Arg4, Object Arg5, Object Arg6, Object Arg7, Object Arg8, Object
Arg9, Object Arg10, Object Arg11, Object Arg12, Object Arg13, Object Arg14,
Object Arg15, Object Arg16, Object Arg17, Object Arg18, Object Arg19, Object
Arg20, Object Arg21, Object Arg22, Object Arg23, Object Arg24, Object Arg25,
Object Arg26, Object Arg27, Object Arg28, Object Arg29, Object Arg30)
at ExcelRender.ViewListing.NextButton_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventAr gs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.O nMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)

************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINNT/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
ExcelRender
Assembly Version: 1.0.2742.37164
Win32 Version: 1.0.2742.37164
CodeBase:
file:///C:/Program%20Files/Oracle/Xml%20Publisher/Consolidation%20AddIn/ExcelRender.dll
----------------------------------------
Interop.Scripting
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase:
file:///C:/Program%20Files/Oracle/Xml%20Publisher/Consolidation%20AddIn/Interop.Scripting.DLL
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase:
file:///C:/WINNT/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase:
file:///C:/WINNT/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase:
file:///C:/WINNT/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
Interop.Excel
Assembly Version: 1.3.0.0
Win32 Version: 1.3.0.0
CodeBase:
file:///C:/Program%20Files/Oracle/Xml%20Publisher/Consolidation%20AddIn/Interop.Excel.DLL
----------------------------------------
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase:
file:///C:/WINNT/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase:
file:///C:/WINNT/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Accessibility
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase:
file:///C:/WINNT/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

Please help me on this issue.

Thanks,
Sandeep

Hi all,
Is it possible to create and add the hyperlink after the existing data
in the cell(that is, in the next line after the existing data in the
same cell). So what i'm trying to do is, to get an outlook email, store
email as .msg file in my folder and then add hyperlink to the just
stored file in a particular cell in my worksheet. I can do all the
things except for appending the hyperlink. As i create the hyperlink
and add it in the cell selected by user, all the data in that cell is
just overwritten by the hyperlink. So after this i only have the
hyperlink in the cell and all the data that was there in the cell is
lost. so is it possible to keep both , the existing data and hyperlink
added in the cell.
i tried reading the data of the cell into a variable before creating
and adding hyperling. then i added the hyperlink in the cell. then i
concatenated the data and hyperlink and then i made this concatination
as the value of cell. but with this process, all the data is converted
into the hyperlink, that is data that was there before the hyperlink is
also a part of hyperlink text now. so is it possible to have normal
text and hyperlink together in 1 cell.
my code is....

existingData = SelCells(j).Value
ActiveSheet.Hyperlinks.Add Anchor:=SelCells(j), _
Address:=FullPath, TextToDisplay:=Filename
hyperlinkString = SelCells(j).Value
SelCells(j).Value = existingData & vbCrLf & hyperlinkString

thanx for any help
amit

Hi everybody

I need help for reading data from text files and saving it under different columns in the excel file using vba macro.

For example: I have many text files in the following format

File 1:
1 2 3 4
1 3 5 7
1 3 1 8

File 2:
1 2 3 4
1 3 5 7
1 3 1 8

In excel file the above files should be saved one below the other seperated by the name of the text file, in seperate coumns as found in the text file.

I found an example online but it saves the data under a single column only. I tried changing it to my requirement, but I couldn't. I have attached the example that I found online.

Thanks
Bharath

Hi all,

Generally If this were a straight copy of a sheet I would know how to code it, but there are a few conditions that I want to add that Im not sure how to approach.

I have a spreadsheet that is a cash register and records the day's sales history.
On closing the only sheet visible is "Pack Down Procedure", where the use goes through a bunch of steps and then eventually clicks the "CLOSE SHOP" button, which clears all the data for the day and restores the "Cash Register" sheet for when the user next opens the xls.

Before completing these two task I would also like that button to do few things:

First of all copy the sheet "Today" which at this point is set to visible = xlVeryHidden

Then move that copied sheet to another workbook;

If there is an existing workbook for the current month I would like the sheet moved to that workbook and renamed as the current date (the date is displayed on the "Today" sheet in cell "B3"). ie for August it would be called; Lenny's Takings - 2010-08.xls and the tab for today called 23/08/10

The location of this workbook would be C:UsersAdamDocumentsCafe DocsLenny'sAccountingLenny's Takings - 2010-08.xls

However, when the shop is open for the first time for a month, ie 1st, 2nd or 3rd of that month, there will not be an existing workbook for that month for the sheet to paste into.

Therefore if there is no existing workbook for the month I would like it to Open, rename and Save from the template xls called; Lenny's Takings - Template.xls

Its location is C:UsersAdamDocumentsCafe DocsLenny'sAccountingLenny's Takings - Template.xls

ie if there was no workbook for this month the macro would open, rename and save the template as the filename above Lenny's Takings - 2010-08.xls and then move the copied "Today" sheet into that document and rename the tab from "Today" to the current date.

If this ispossible, any help would be greatly appreciated.

Thanks

Hello All

I hope someone can help me.

Is it possible to add some code to an existing UserFrom with VBA only?

I have around 50 spreadsheets that are being used by employees to record their work. I have now written a script to make some adjustments to these sheets and update them. The intention is that I will send out a sheet with a macro that will adjust and update their time sheet for them.

The script now does almost everything I want it to, however I would like to be able to add the following code to an existing UserForm in the workbook called "NewSheet"

Private Sub UserForm_Initialize()
   Me.Year.Value = ThisWorkbook.Sheets("Sheet1").Range("N15").Value
End Sub
Sorry for the long winded description but I wanted to explain why I want to make this seeming minor change through VBA.

Thanks in advance for any help you can provide.

Cheers

Jim


No luck finding an answer? You could always try Google.