+ Reply to Thread
Results 1 to 17 of 17

Code to write in specific cell

  1. #1
    Forum Contributor
    Join Date
    02-07-2011
    Location
    Bhutan
    MS-Off Ver
    Excel 2007
    Posts
    244

    Code to write in specific cell

    Hi,
    I want a code to write few details in the active sheet. Like when ever I run the code it executes the same thing.
    I have uploaded the templete how I want it to be printed in the sheet without any gridlines.
    thanks in advance.
    Attached Files Attached Files
    Last edited by fatalcore; 07-09-2011 at 03:13 PM.

  2. #2
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Code to write in specific cell

    What kind of details do you want to write and where do you want them? The sheet named Index has provided us with Column headers but that's it (or are those the details?). Please clarify.

    Regards:
    If you're happy with someone's help, click that little star at the bottom left of their post to give them Reps.

    ---Keep on Coding in the Free World---

  3. #3
    Forum Contributor
    Join Date
    02-07-2011
    Location
    Bhutan
    MS-Off Ver
    Excel 2007
    Posts
    244

    Re: Code to write in specific cell

    I want the column headers to be inserted by the code ie from A10 - K14 in the active sheet.
    Along with the fill color and text color white for A10 - K14.
    Thanks in advance.

  4. #4
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Code to write in specific cell

    You want them to be inserted into the other sheets?

  5. #5
    Forum Contributor
    Join Date
    02-07-2011
    Location
    Bhutan
    MS-Off Ver
    Excel 2007
    Posts
    244

    Re: Code to write in specific cell

    No I want a vba code that when executed will write the details from A10-K14 in the current sheet.
    Means when ever I open up any file and will run the code in vba the A10-K14 will be generated in that sheet.
    Hope you are getting me.
    Thanks in advance.

  6. #6
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Code to write in specific cell

    Hopefully this helps. Open the the workbook that I uploaded and then click the button on the Index sheet to add a new sheet.
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    02-07-2011
    Location
    Bhutan
    MS-Off Ver
    Excel 2007
    Posts
    244

    Re: Code to write in specific cell

    Thanks Mordred its working!
    Thanks a ton. Mordred do you have a simple code than can remove the gridlines and split from Active sheet only ?
    Thanks in advance.

  8. #8
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Code to write in specific cell

    Sorry fatalcore, I am unsure as to what you are referring to with grid lines and split from active sheet.

  9. #9
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Code to write in specific cell

    Do you mean remove borders?

  10. #10
    Forum Contributor
    Join Date
    02-07-2011
    Location
    Bhutan
    MS-Off Ver
    Excel 2007
    Posts
    244

    Re: Code to write in specific cell

    No I am uploading a file with the requirement. There are two tabs I have and what I want.
    I mean you goto view tab and then under show group there is gridline and freeze panes in the same menu under Windows group.

    I want that both to be removed from the active sheet only.
    Thanks in advance.
    Attached Files Attached Files

  11. #11
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Code to write in specific cell

    The last workbook that I uploaded for you doesn't freeze the panes with the addition of a new sheet so I guess you are wanting to unfreeze the sheets that currently exist in your workbook. If that is the case then I am sorry but I don't really know. Unless you go through and activate each sheet like:
    Please Login or Register  to view this content.

  12. #12
    Forum Contributor
    Join Date
    02-07-2011
    Location
    Bhutan
    MS-Off Ver
    Excel 2007
    Posts
    244

    Re: Code to write in specific cell

    Ok ... You are right I need to check that out.

    I am also stuck at another point .

    Please Login or Register  to view this content.

    When I am pressing cancel i am getting an error message ...Any Help would be great.
    Thanks in advance.

  13. #13
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Code to write in specific cell

    HI fatalcore, you are posting a new and different question. If you have new questions regarding a different topic, please create a new thread (it helps for search engines) with your new question. Also, if your last question has been answered, please mark the thread as solved. If it is not solved, let us know so that we can come to a solution.

    Regards

  14. #14
    Forum Contributor
    Join Date
    02-07-2011
    Location
    Bhutan
    MS-Off Ver
    Excel 2007
    Posts
    244

    Re: Code to write in specific cell

    Yes I am thankfull for your response. Please mark this thread as Solved.
    Thanks again ..I am creating a new thread for the last post.

  15. #15
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Code to write in specific cell

    Ignore what I had said as I have worked your second question into the code I provided. With the button in the index sheet, right click it, then click Assign Macro. When the assign macro window comes up, single click NewHeaders and then click Edit (on the right side of the Assign Macro Window). Select all and then copy paste the following code into module
    Please Login or Register  to view this content.

  16. #16
    Forum Contributor
    Join Date
    02-07-2011
    Location
    Bhutan
    MS-Off Ver
    Excel 2007
    Posts
    244

    Re: Code to write in specific cell

    When ever I am pressing the Cancel key I am getting a run time error and extra 3 sheets are added...
    Previous was better. I have adjusted the code you have given previously ...No more problem ...Thanks for the same.
    You can mark it as solved.

  17. #17
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Code to write in specific cell

    Hi fatalcore, you have to mark it as solved. Check the private message I sent you for the description of how to do this.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1