Book

Suggestions


Enter your email address:

Delivered by FeedBurner


Home Page

Bloglines

1906
CelebrateStadium
2006


OfficeZealot

Scobleizer

TechRepublic

AskWoody

SpyJournal












Subscribe here
Add to 

My Yahoo!
This page is powered by Blogger. Isn't yours?

Host your Web site with PureHost!


eXTReMe Tracker
  Web http://www.klippert.com



  Thursday, November 05, 2009 – Permalink –

Change Code to Comments

Fast solution


When you're testing procedures, you can temporarily convert a block of VBA code to comments that will be ignored during a trial run.

Doing so manually by inserting an apostrophe before each line of code can be a real chore.

To simplify this task,
  1. Open any module in the Visual Basic Editor (VBE)
  2. Choose View >Toolbars>Edit from the menu bar to display the Edit toolbar.
  3. Select the lines of code that you want to turn into comments.
  4. Click the Comment Block button on the Edit toolbar (it's the sixth button in from the right end of the toolbar).
Each line of the selected code is now preceded with an apostrophe. To convert the comments back to executable code, select the appropriate lines and click the Uncomment Block button, which is immediately to the right of the Comment Block button.




See all Topics

Labels:


<Doug Klippert@ 3:42 AM

Comments: Post a Comment


  Wednesday, November 04, 2009 – Permalink –

Paste is Special

Versatile functions


If the data you brought into Excel comes through as text rather than numbers, Paste Special can fix it.

  1. Go to an empty cell.
  2. Copy it
  3. Select the "corrupted" data.
  4. Go to Edit>Paste Special and choose Add.
This works better than multiplying by one. Empty cells remain empty


What's So Special About "Paste Special"?

Excel Paste Special function

Pasting Using Paste Special




See all Topics

Labels:


<Doug Klippert@ 3:08 AM

Comments: Post a Comment


  Thursday, October 29, 2009 – Permalink –

Hep Me

Help topic locations


This from Ron de Bruin:



"Using the Help Context IDs

To make use of this file(s), locate the help topic of interest and make a note of its context ID.

Then, write a VBA subroutine that displays the topic.

You can attach the subroutine to a button, or provide some other way for the user to execute the sub.

For example, if you'd like to display the help topic that show the Date/Time Functions List,
you'll find that the context ID for that particular topic is 5199659.

The following VBA procedure displays that help topic."


Sub ShowHelp()
Application.Help "XLMAIN" & Val(Application.Version) & ".CHM" ,5199659
End Sub


Help Context IDs for Excel




See all Topics

Labels: , , ,


<Doug Klippert@ 3:09 AM

Comments: Post a Comment


  Sunday, October 25, 2009 – Permalink –

Export Formatted Sheets

Access to Excel


Access provides an easy way to export data to Excel through the Office Links feature.

To use this feature, simply select a relevant database object and choose Tools>Office Links> Analyze It With Excel.

The worksheet Excel creates includes some minor formatting applied to the field headings that appear in row 1. Some formatting in your original Access database affects the worksheet cell formatting as well. For example, if you're exporting from a datasheet, gridline and font attributes are carried over to Excel. If you use the Office Links feature to export data behind a form, text box shading and font properties are applied.

The final result in Excel may not exactly match your Access data; however, you'll probably find that less work is required to get your Excel version of the data into an easily readable state.

In Office 2007-10 it's External Data>Excel






See all Topics

Labels:


<Doug Klippert@ 3:07 AM

Comments: Post a Comment


  Thursday, October 22, 2009 – Permalink –

Move Using Alt

One sheet to another



To move data from one worksheet to another, highlight the data.

Hold down the ALT key and move the mouse until the pointer arrow is on the border of the selection.

Drag the selection down to the destination worksheet tab.

When the arrow touches the tab, Excel switches to the desired worksheet.

Now drag the selection to the correct position. Let go of the mouse and then the ALT key.

To copy data hold down the CTRL+ALT keys and perform the steps above.

BTW the screen will not scroll while you hold the ALT key down.






See all Topics

Labels: ,


<Doug Klippert@ 3:56 AM

Comments: Post a Comment


  Saturday, October 17, 2009 – Permalink –

Shortcut Borders

Keyboard trick


Use Ctrl+1 to bring up Excels Formatting dialog box. Shift+B will take you to the Borders tab.

Now you can use the following key strokes (2002+):

ALT+T
Apply or remove the top border.
ALT+B
Apply or remove the bottom border.
ALT+L
Apply or remove the left border.
ALT+R
Apply or remove the right border.
ALT+D
Apply or remove the downward diagonal border.
ALT+U
Apply or remove the upward diagonal border.
ALT+H
Apply or remove the horizontal interior border.
ALT+V
Apply or remove the vertical interior border.
ALT+O
outlines the cells.
ALT+I
give interior (vertical and horizontal).
ALT+N
removes all borders.
ALT+C
brings up the color palette.



Shortcuts for Applying Borders

Ctrl+Shift+7 will outline a cell without having to display the Format dialog.




See all Topics

Labels: , ,


<Doug Klippert@ 3:28 AM

Comments: Post a Comment


  Sunday, October 11, 2009 – Permalink –

Update Excel on the Web

Auto Republish


You can save an Excel file as a Web page and makes it easy to update data in a worksheet that has already been saved to the Web.

Here is how to save an Excel file as a Web page and set it up it for automatic updates:
  1. Click Save As Web page from the File menu. (click the Office logo in 2007)

  2. In the Save As dialog box, click the Publish button. (click Publish, Create Document Workspace in 2007)

  3. Use the drop down arrow beside Choose to select what you want to publish.

  4. In the File name field, enter a file name.

  5. Place a check beside Auto Republish every time this worksheet is saved. This way the data will be updated each time you make changes to the worksheet.

  6. Select Open published page in Web browser to view the data in your Web browser after you click Publish.

  7. Click Publish.
Lockergnome.com:
 Save Excel as Web Page

DevX.com:
 Four Ways to Use Excel on the Web

Penn State:
 Interactive Excel on the Web



See all Topics

Labels: ,


<Doug Klippert@ 3:49 AM

Comments: Post a Comment


  Thursday, October 08, 2009 – Permalink –

Copy Paste

Excel tables


One way to create a new table in an Access database from information included in an Excel spreadsheet is to select the pertinent data on the spreadsheet, including the field names.

Copy the selection (Edit>Copy, or CTRL+C)

Switch back to Access .

With Tables objects being shown in the database window, choose Edit>Paste, or use the CTRL+V shortcut.

Access will ask if the first row contains the field names and then will paste the information as a new database table.




See all Topics

Labels:


<Doug Klippert@ 3:46 AM

Comments: Post a Comment


  Wednesday, September 30, 2009 – Permalink –

When 28 is 30

How long is a month?


When you use the banker's DAYS360 function to calculate the number of days between two dates, you can get an odd answer.

If you use the DAYS360 function with a start date of February 28 and with an end date of March 28, a value of 28 days is returned.
You expect a value of 30 days to be returned for every full month. (12*30=360)

This behavior may occur if you use the U.S. method, also known as the NASD method, with the DAYS360 function.

To work around this behavior, use the European method with the DAYS360 function. With the European method starting dates and ending dates that occur on the 31st of a month become equal to the 30th of the same month. To use the European method with the DAYS360 function, use the following syntax:

=DAYS360(cell number of start date,cell number of end date,TRUE)

Using FALSE or omitting the third parameter uses the U.S. method

Support.microsoft.com
An unexpected value with the DAYS360 function




See all Topics

Labels: , ,


<Doug Klippert@ 3:19 AM

Comments: Post a Comment


  Thursday, September 24, 2009 – Permalink –

Shut it All Down

Close the spreadsheet and Excel


As it comes out of the box, at this point, Excel 2007 is set to display spreadsheets on the task bar. No big deal 2003 did too.

If, however, you only have one workbook open and want the application to shut down when you close the book you must make a little change.

Just as before, you must deselect Windows in the Taskbar from the View Options.

In 2007 it is located by clicking on the logo icon, then choose Excel Options. The Windows entry is on the Personalize screen






See all Topics

Labels: ,


<Doug Klippert@ 3:44 AM

Comments: Post a Comment


  Thursday, September 17, 2009 – Permalink –

Lock the Barn

Protect your work



John Walkenbach has put together an FAQ on Workbook/Worksheet/VBA protection.
Spreadsheet Protection FAQ

The Microsoft Knowledge Base article KB 293445 Has a list of references to protection information.


Microsoft Excel provides multiple layers of protection to allow you to control who can access and change your data:
  • Worksheet protection: You can protect elements on a worksheet (for example, cells with formulas) from all user access, or you can grant individual users access to the ranges that you specify.
  • Workbook-level protection: You can apply protection to workbook elements, and you can protect a workbook file from being viewed and edited. If a workbook is shared, you can protect it from being returned to exclusive use and prevent the change history from being deleted.
... articles address some of the more frequently asked questions about workbook and worksheet protection in Excel:
  • How can I grant only a few users access to a range in my worksheet?
  • Why are users not allowed to edit the ranges that I established permissions for?
  • What new features are available in workbook protection?
  • Why don't the permissions that I set on ranges in my worksheets carry over to Windows 98 computers?
Here is more information
Overview of security and protection in Excel




See all Topics

Labels: , ,


<Doug Klippert@ 3:44 AM

Comments:
You might want to check out Mike Alexander's blog post about how easy it is to remove worksheet protection in Excel 2007.

http://datapigtechnologies.com/blog/index.php/hack-into-a-protected-excel-2007-sheet/

 
Post a Comment


  Saturday, September 12, 2009 – Permalink –

Declaring Multiple Variables

Declare each one


When setting up a macro in VBA, if you want to declare multiple variables in one line of code, be sure to specify the type for each variable, even if the variables are the same type. Avoid code like the following:

Dim strFName, strLName, strMI As String

In such a case, only the last variable, strMI, is actually declared as a String type. The first two variables are designated by default as Variant data types.

To correctly declare the three variables, you would use the statement:

Dim strFName As String, strLName As String, strMI As String




See all Topics

Labels:


<Doug Klippert@ 6:47 AM

Comments: Post a Comment


  Friday, September 11, 2009 – Permalink –

AutoShapes

Drawing bar objects



Kim Hedrich has put together a series of basic articles on AutoShapes for TechTrax.

AutoShapesPart 1 - How to draw circles, ovals, squares and rectangles; also modifying fill and line colour

AutoShapes Part 2 - Fill Effects

AutoShapes Part 3 - Shadows and 3-D

AutoShapes - Text Inside a Shape




See all Topics

Labels: ,


<Doug Klippert@ 3:13 AM

Comments: Post a Comment


  Thursday, September 10, 2009 – Permalink –

Trouble with Save?

Also great notification service



You may experience issues when you try to save a Microsoft Excel file if one or more of the following conditions are true:
  • You save an Excel file to a network drive where you have restricted permissions.
  • You save an Excel file to a location that does not have sufficient drive space.
  • The connection to the Excel file has been lost.
  • There is a conflict with an antivirus software program.
  • You save an Excel file that is shared.
  • The 218-character path limitation has been exceeded when you save an Excel file.
  • The Transition Formula Evaluation feature is turned on in Excel.
  • The file was created from a template that contains embedded objects.

How to troubleshoot errors when you save Excel files. KB 271513.
Receive Free Email Alerts every time Microsoft Publishes NEW Support or Knowledge Base Articles! kbAlertz.com is an e-mail notification system that scans the entire Microsoft Knowledge Base every night, and e-mails you when updates or additions are made to the technologies, you subscribe to.
kbAlertz See all Topics

Labels:


<Doug Klippert@ 3:50 AM

Comments: Post a Comment


  Wednesday, September 02, 2009 – Permalink –

Dynamic Tabs

Change tab names automatically


Changing the names of tabs is easy, just double click the tab or right click and choose rename.

Allen Wyatt has a small piece of code that will automatically update the tab name based on the value of a cell in the spreadsheet.


Sub myTabName()
ActiveSheet.Name = ActiveSheet.Range("A1")
End Sub

Allen also has some error checking code on his site:

Dynamic Worksheet Tabs


Dick Kusleika suggests another way using a change event:

Naming a sheet based on a cell




See all Topics

Labels: , , , ,


<Doug Klippert@ 3:33 AM

Comments: Post a Comment


  Tuesday, August 25, 2009 – Permalink –

Charting Tools

Sample graphs


Ed Ferrero has a number of sample Excel charts and tools.

One he calls a Wind Rose:


How to build a wind rose. Converts compass directions to degrees and radians, and plots a nice-looking chart.



Ferrero Consulting Pty Ltd:
EdFerrero.com/Charting




See all Topics

Labels: ,


<Doug Klippert@ 3:05 AM

Comments: Post a Comment


  Saturday, August 22, 2009 – Permalink –

Self Help

Get started in the right direction


The Office of Technology Services of Towson University, located in Towson, Md., provides Self-Help Training Documents for many applications.

They are available for many levels of knowledge. They’re clean, clear, and concise.
  • Access

  • Adobe Acrobat

  • Dreamweaver

  • Excel

  • FrontPage

  • Microsoft Office Tools

  • Outlook

  • Outlook Web Access

  • PowerPoint

  • Publisher

  • Visio

  • Windows

  • Word Art

  • Word
Tech Docs




See all Topics

Labels:


<Doug Klippert@ 3:06 AM

Comments: Post a Comment


  Thursday, August 20, 2009 – Permalink –

Still More Functions

Never Enough


Laurent Longre Has put together an Excel add-in with 65 more functions.

Here are a few you might find useful:


CHBASE


converts a value from a base into another base.

EASTERDATE


date of Easter Sunday for a given year

FORMULATEXT


returns the formula of a cell

MMAX


returns the N highest numbers of a range or an array

NBTEXT


converts a positive number into spelled-out text (supports 13 languages)

UNIQUEVALUES


returns the unique items of a range or an array

MOREFUNC.XLL, 65 add-in worksheet functions




See all Topics

Labels: ,


<Doug Klippert@ 3:14 AM

Comments: Post a Comment


  Friday, August 14, 2009 – Permalink –

Digital Signatures

How do I know it's real?


If you find a need to provide some sort of certification that your document has not been tampered with and is the rel thing, you might consider a digital signature.

This Microsoft Support article discusses the process.
What is a digital certificate?

What is a digital signature?

What occurs when I use a digital signature?

What Word files can I sign?

How can I obtain a digital signature?
  • Method 1: Obtain a digital certificate from a certification authority
  • Method 2: Create your own digital certificate
    Description of digital signatures and code

    Here's information for Excel.

    Digital Signatures for Excel




    See all Topics

    Labels: , ,


    <Doug Klippert@ 3:58 AM

    Comments: Post a Comment


      Thursday, August 13, 2009 – Permalink –

    Scroll Restrictions

    Without Protection


    You can protect a spreadsheet so that data is shielded from inadvertent entries.
    There is another way to set up a scroll area that does not involve protection.
    Open the Control Toolbox (right-click any existing tool bar) and click on the Properties icon.

    In the Scroll Area text box, type the scroll area range, or type the defined Name for the range.
    To cancel the Scroll Area restricted range, clear the Scroll Area text box.



    If you are using Office 2007, the Property icon is on the Developers tab.



    Multiple areas can be selected using Protection, but only one area is allowed using the Scroll Property.





    See all Topics

    Labels: , ,


    <Doug Klippert@ 3:29 AM

    Comments: Post a Comment


      Monday, August 10, 2009 – Permalink –

    Military Clipart

    Thousands of items


    If you find the need for Armed Forces photos and art, here is the place to look.
    Regardless of your opinion about their present mission, the military does present a spectacular visage.



    "06/17/06 - An F/A-18E Super Hornet aircraft sits at the ready as storm clouds pass overhead aboard the Nimitz-class aircraft carrier USS Ronald Reagan (CVN 76) in the Philippine Sea June 17, 2006.
    (U.S. Navy photo by Photographer's Mate 2nd Class Aaron Burden)

    All of these files are in the public domain unless otherwise indicated. However, we request you credit the photographer/videographer as indicated or simply "Department of Defense."


    HqDA.Army.Mil - Clipart



    See all Topics

    Labels:


    <Doug Klippert@ 3:02 AM

    Comments: Post a Comment


      Wednesday, August 05, 2009 – Permalink –

    Large Text Files

    Split between worksheets


    While this problem is alleviated in Excel 2007 with its 1,048,576 rows by 16,348 columns, The old XL versions are still here.

    Text files with a large number of records are better handled in a program like Access. Having said that, there can be times that these lists must be imported into Excel. If the file has over 65,536 records, the data will not fit on a single worksheet.

    Here's a Microsoft Knowledge Base article with the macro code needed to bring oversized text data into Excel and split it into multiple worksheets:

    Sub LargeFileImport()
    
    'Dimension Variables
    Dim ResultStr As String
    Dim FileName As String
    Dim FileNum As Integer
    Dim Counter As Double
    'Ask User for File's Name
    FileName = InputBox("Please enter the Text File's name, e.g. test.txt")
    'Check for no entry
    If FileName = "" Then End
    'Get Next Available File Handle Number
    FileNum = FreeFile()
    'Open Text File For Input
    Open FileName For Input As #FileNum
    'Turn Screen Updating Off
    Application.ScreenUpdating = False
    'Create A New WorkBook With One Worksheet In It
    Workbooks.Add template:=xlWorksheet
    'Set The Counter to 1
    Counter = 1
    'Loop Until the End Of File Is Reached
    Do While Seek(FileNum) <= LOF(FileNum)
    'Display Importing Row Number On Status Bar
    Application.StatusBar = "Importing Row " & _
    Counter & " of text file " & FileName
    'Store One Line Of Text From File To Variable
    Line Input #FileNum, ResultStr
    'Store Variable Data Into Active Cell
    If Left(ResultStr, 1) = "=" Then
    ActiveCell.Value = "'" & ResultStr
    Else
    ActiveCell.Value = ResultStr
    End If
    
    'For Excel versions before Excel 97, change 65536 to 16384
    If ActiveCell.Row = 65536 Then
    'If On The Last Row Then Add A New Sheet
    ActiveWorkbook.Sheets.Add
    Else
    'If Not The Last Row Then Go One Cell Down
    ActiveCell.Offset(1, 0).Select
    End If
    'Increment the Counter By 1
    Counter = Counter + 1
    'Start Again At Top Of 'Do While' Statement
    Loop
    'Close The Open Text File
    Close
    'Remove Message From Status Bar
    Application.StatusBar = False
    
    End Sub


    Importing Text Files Larger Than 16,384/65,536 Rows

    Notice the code about 17 lines from the bottom of the macro.

    'For xl97 and later change 16384 to 65536.

    Also, after import, the data must be parsed. Use Data>Text to columns.




    If you have not worked with macros before, Dave McRitchie has a tutorial:

    Getting Started with Macros and User Defined Functions




    See all Topics

    Labels: , ,


    <Doug Klippert@ 3:13 AM

    Comments: Post a Comment


      Thursday, July 23, 2009 – Permalink –

    Excel VBA Help File

    Download from Microsoft


    Here is a downloadable compiled Help file covering the vagaries of Excel VBA.

    You can use this file without having to, necessarily opening the application.

    Excel 2003 VBA Language Reference




    See all Topics

    Labels:


    <Doug Klippert@ 3:58 AM

    Comments: Post a Comment


      Thursday, July 16, 2009 – Permalink –

    65,539 Question

    The eleventh place error


    Sure, you got a recall notice on your new car because the drink holder was the wrong size.

    Big deal, Excel 2007 also has/had a problem with some calculations.


    The result of the calculation is a number from 65534.99999999995 to 65535. The calculation is performed correctly. However, the result is incorrectly shown as 100000.

    The result of the calculation is a number from 65535.99999999995 to 65536. The calculation is performed correctly. However, the result is incorrectly shown as 100001.


    Excel 2007 hotfix package

    Calculation Issue Update




    See all Topics

    Labels:


    <Doug Klippert@ 5:39 AM

    Comments: Post a Comment


    Access-Excel-XML-HTML

    Transfer data


    XML makes data transferable between applications.
    Here is a tutorial with downloadable files.
    Some simple guidance of how to transfer data from Excel or Access into HTML web pages using XML data files. VBA programs can be used to export data tables from Excel or Access into simple XML files. There are several examples of using different methods to display the XML and XSL files on web pages in order to quickly share your data with others.


    An introduction to Excel and XML data files

     
    Also:
    Some nice photos and calendar layout:
    Monthly calendar with photos




    See all Topics

    Labels: ,


    <Doug Klippert@ 3:56 AM

    Comments: Post a Comment


      Wednesday, July 15, 2009 – Permalink –

    Restore Defaults

    Office 2003 redo


    To reset the original settings in Office 2003, follow these steps.
    Make sure that you back up your files before you follow these steps.
    1. 1. Start any Office 2003 program.
    2. On Help menu, click Detect and Repair.



    3. Click to select the Discard my customized settings and restore default settings check box, and then click Start.
    4. Quit the application, and then click Ignore.
    5. Click OK when you receive the following message:
      Reset of setting to default succeed.

    Microsoft Office Diagnostics in 2007 replaces Diagnose and Repair:

    Howtogeek.com




    See all Topics

    Labels: ,


    <Doug Klippert@ 3:28 AM

    Comments: Post a Comment


      Sunday, July 12, 2009 – Permalink –

    Plain Numbers

    I'd Like to Make It Clear


    Plain Figures is a method of transforming statistical and financial data into figures, tables and graphs that people readily understand.

    Have you ever:
    • squinted your eyes trying to see the numbers in a PowerPoint presentation?

    • scratched your head at a charity leaflet with an indecipherable pie chart titled 'Where your donation goes' ... and set it aside?

    • missed discussion at a meeting because you were busy trying to figure out the figures?

    • put aside a graph or table, thinking "I'm not good with numbers."?

    Then you know how important the clear display of numerical information can be. Common problems People have trouble using numerical information for many reasons. Most commonly, authors don't know:
    • what to include: when unsure what numbers are important, people frequently display them all, overpowering the reader with irrelevance.

    • which format to use: the choice between text and table, table and chart, bar and pie.

    • how to use the technology effectively: computer software generates graphs easily, but the results hide your point behind incomprehensible chartjunk.

    • how to explain the information: selecting the right words for titles, columns and captions.

    Plain Figures is a partnership between Sally Bigwood, located in Wakefield, Yorkshire, UK, and Melissa Spore, who divides her time between Toronto and Saskatoon, Canada. Sally and Melissa are sisters and both have dual citizenship in the United States. PlainFigures.com See all Topics

    Labels: , ,


    <Doug Klippert@ 3:02 AM

    Comments: Post a Comment


      Wednesday, July 08, 2009 – Permalink –

    Polyglot Polynomials

    ToolPak Translator


    I was disappointed recently when I tried to look up Eric Desart's ToolPak translator. I found his site "niet beschikbaar."

    I won't use the boy and wet thumb story, but Ron de Bruin did spring up to save the day and make the download available.


    "Ever wanted an oversight of the Analysis-ToolPak Add-In functions, their descriptions, their arguments, their VBA and Procedure names, and all of this in your LOCAL language including translations versus the corresponding English names?

    This utility extracts this data from your LOCAL MS Excel edition.

    As such this table can be generated for ANY LANGUAGE EDITION of MS Excel, even when this language is not yet integrated in the utility."


    Analysis ToolPak Translator




    See all Topics

    Labels: ,


    <Doug Klippert@ 3:03 AM

    Comments: Post a Comment


      Tuesday, June 30, 2009 – Permalink –

    Thirtieth Condition Formatting

    Three is not always enough


    Pre-2007 Excel gives the user the ability to specify up to three conditions under Format>Conditional Formatting.

    If that is not enough, Frank Kabel and Bob Phillips of xlDynamic.com offer a free download that extends the conditions to 30!




    Extended Conditional Formatter

    Also see:
    Conditional Formatting (including 2007)




    See all Topics

    Labels: , , ,


    <Doug Klippert@ 3:09 AM

    Comments: Post a Comment


      Sunday, June 21, 2009 – Permalink –

    Clip Art at Home

    Install more


    Do you remember all of the clip art that was available locally with Office XP?

    When you have an Internet connection, you have access to the Office Online collection, but if you would like more clip art installed on your machine:


    A small amount of sample clip art images was included The 2007 Office systems and Office 2003 and is part of the "local collection" that is searched when you do not have Internet access to the Microsoft Office Online Clip Art and Media Web site. Office 2003 no longer included a media content CD with additional clip art. However, the Microsoft Office XP Media Content CD can still be installed locally or on a network share.

    The Office XP Media Content CD contains approximately 35,000 clips that are a subset of the clips that are available on the Microsoft Office Online Clip Art and Media Web site. The Office XP Media Content CD was included with Microsoft Office XP Professional, Microsoft Office XP Standard, and Microsoft Publisher 2002 Deluxe Edition.

    To install the contents of the Office XP Media Content CD on a computer, follow these steps:
    1. Exit all programs that are running

    2. Insert the Office XP Media Content CD into the CD drive or into the DVD drive
      (Hold down the SHIFT key to prevent the program from automatically starting. If Microsoft Windows Installer automatically starts, click Cancel)

    3. Click Start, click Run, type the following command, and then click OK:
      msiexec.exe /i CD_drive:\CAG.MSI ADDLOCAL=ALL /qb
    (CD_drive is the letter of the drive that contains the Office XP Media Content CD)
    Support.Microsoft.com
    How to add clip art to Clip Organizer in a 2007 Office system and in Office 2003




    See all Topics

    Labels:


    <Doug Klippert@ 3:04 AM

    Comments: Post a Comment


      Wednesday, June 17, 2009 – Permalink –

    VBA Variable Problems

    Explicit protection


    It's good practice to always use the Option Explicit statement in the beginning of your code modules to ensure that all variables are unambiguously declared in your procedures.

    With this process in place, you'll receive a "Variable not defined" error if you try to execute code containing undeclared variables. Without this statement, it's possible to mistype variable names, which would be interpreted as new Variant type variables.

    This could severely impact the results of your code, and you might not ever know it. If you do find a problem, tracking down where the error is can be a chore.

    Although you can manually type the statement into your modules, changing a setting in Access can ensure that the statement is always added to new modules.

    1. Open a module (start the VBA Editor)

    2. Choose Tools>Options from the menu bar

    3. On the Editor tab of the Options dialog box, select the Require Variable Declaration check box in the Code Settings panel

    4. Finally, click OK





    See all Topics

    Labels:


    <Doug Klippert@ 3:36 AM

    Comments: Post a Comment


      Sunday, June 14, 2009 – Permalink –

    Julian Dates

    Gregorian to/from Julian



    Julian dates refer to the number of days from the first of the year and the number of days until the end of the year.


    The year -45 has been called the "year of confusion," because in that year Julius Caesar inserted 90 days to bring the months of the Roman calendar back to their traditional place with respect to the seasons. This was Caesar's first step in replacing a calendar that had gone badly awry. Caesar created a solar calendar with twelve months of fixed lengths and a provision for an intercalary day to be added every fourth year. As a result, the average length of the Julian calendar year was 365.25 days.

    The Gregorian (Pope Gregory XIII) calendar is based on a cycle of 400 years, which comprises 146,097 days. Since 146,097 is evenly divisible by 7. Dividing 146,097 by 400 yields an average length of 365.2425 days per calendar year, which is a close approximation to the length of the tropical year. The Gregorian calendar accumulates an error of one day in about 2500 years.


    Calendars by L. E. Doggett


    From Chip Pearson's site CPearson.com:


    "Many applications (especially mainframe systems) store dates in the Julian format, which is a 5-digit number, consisting of a 2-digit year and a 3-digit day-of-year number. For example, 24-August-1999 is stored as 99236, since 24-August is the 236th day of the year. Excel does not support Julian dates directly, but you can use them with only a few fairly simple formulas.

    Converting A Standard Date To A Julian Date

    The formula below will convert a standard Excel date in A1 to a Julian Date.

    =RIGHT(YEAR(A1),2)&TEXT(A1-DATE(YEAR(A1),1,0),"000")

    This formula takes the 2 right-most characters of the YEAR of the date in A1, and then appends the number of days between the date in A1 and the 0th day of that year. The TEXT function formats the day-of-year number as three digits, with leading zeros if necessary.

    Converting A Julian Date To A Standard Date


    The formula below will convert a Julian date to a standard Excel date.

    =DATE(IF(0+(LEFT(A1,2))<30,2000,1900)+LEFT(A1,2),1,RIGHT(A1,3))

    If the year digits of the Julian date are less than 30 (i.e., 00 to 29), the date is assumed to be a 2000 century year. If the year digits of the Julian date are greater than or equal to 30 (i.e., 30 to 99), the date is assumed to be a 1900 century year. This formula works by taking advantage of the fact that the DATE function can handle days beyond the "normal" days in a month. For example, DATE correctly computes 100-Jan-1999 to be 10-April-1999.

    These Julian dates must have the leading zero or zeros for years between 2000 and 2009. For example the 123rd day of 2000 must be entered as 00123. Format the cell as TEXT before entering the data, or enter an apostrophe before the Julian date -- e.g., '00123. This will prevent Excel from treating the Julian date as a number and suppressing the leading zeros."


    US Naval Observatory has this definition (and a calculator):

    Julian dates (abbreviated JD) are simply a continuous count of days and fractions since noon Universal Time on January 1, 4713 BCE (on the Julian calendar). Almost 2.5 million days have transpired since this date.


    April 29, 2004 at 6:00 AM would be 2453854.75




    See all Topics

    Labels: ,


    <Doug Klippert@ 3:43 AM

    Comments: Post a Comment