Ask Experts Questions for FREE Help !
Ask
    swaroopa's Avatar
    swaroopa Posts: 3, Reputation: 1
    New Member
     
    #1

    Aug 7, 2009, 07:07 AM
    Macro programming for the uploaded word document
    Hello Sir,

    I am new to write a macro program in Excel 2003. Could you please help me out with macro programming?

    I am attaching a word document in that document I gave all the snap shots of my excel and please go through the document and help me out.

    Note: when I pressed the insert button it went into other window there I have uploaded my word document.

    Thank you for the help in advance:)

    Have a nice time!!
    JBeaucaire's Avatar
    JBeaucaire Posts: 5,426, Reputation: 997
    Software Expert
     
    #2

    Aug 7, 2009, 12:32 PM

    No attachments. Try zipping the file first, then upload it again.
    swaroopa's Avatar
    swaroopa Posts: 3, Reputation: 1
    New Member
     
    #3

    Aug 7, 2009, 06:14 PM
    Thank yoy, I am uploading the Zip file..
    swaroopa's Avatar
    swaroopa Posts: 3, Reputation: 1
    New Member
     
    #4

    Aug 7, 2009, 06:18 PM
    Macro situation in word document
    Hello Sir,

    I am uploading the word document . Please go through the situation.

    I am pleased to hear from you.

    Thanking you,
    Swaroopa.
    Attached Files
  1. File Type: zip macro help.zip (23.5 KB, 34 views)
  2. JBeaucaire's Avatar
    JBeaucaire Posts: 5,426, Reputation: 997
    Software Expert
     
    #5

    Aug 7, 2009, 07:02 PM

    I suspect you may be greatly oversimplifying this scenario, but if it's truly as simply as "find Kostenart" and "thj" and delete everything else around it, that's pretty simple.

    Code:
    Option Explicit
    
    Sub TwoColumnsOnly()
    Dim v1 As Long, v2 As Long, FR As Long
    
    Cells.Find(What:="Kostenart", LookIn:=xlValues, LookAt:=xlWhole).Activate
    Range("A1:A" & ActiveCell.Row - 1).EntireRow.Delete (xlShiftUp)
    
    If ActiveCell.Column > 1 Then _
        Range("A1", Cells(1, ActiveCell.Column - 1)).EntireColumn.Delete (xlShiftToLeft)
        
    Cells.Find(What:="Kostenart", LookIn:=xlValues, LookAt:=xlWhole).Activate
    v1 = ActiveCell.Column + 1
    Rows(1).Find(What:="thj", LookIn:=xlValues, LookAt:=xlWhole).Activate
    v2 = ActiveCell.Column - 1
    
    Range(Cells(1, v1), Cells(1, v2)).EntireColumn.Delete (xlShiftToLeft)
    Rows(1).Delete (xlShiftUp)
    End Sub

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Jpg to word document [ 12 Answers ]

I have received a scanned word document that is in jpg format. Is there a way I can take jpg and paste it into Word so I can work on it?

How to unlock a MS word Document [ 3 Answers ]

I have used a password in MS Word 2003 in saving of document, but I have lost my password to open the word document . Can you plase help me how to open the locked document?

Word Document Locked [ 2 Answers ]

My Microsoft Word document is loocked. The message at the bottom of the document says, "This command is not available because the document is locked for edit." Please help me.

Convert a vista word document to an office 2003 word document [ 1 Answers ]

How can I convert a vista word document to an office 2003 word document?

Converting .pdf to word document [ 2 Answers ]

Hello everyone! I need help in converting a "read-only" document to an editable document. I have an online presentation that allows me to customize the introductory page to meet the company's name and other information. But when I download the presentation, it is downloaded as a .pdf document. ...


View more questions Search