Solved Inserting a tab stop in a macro

Toshiba Satellite c55-a5300 15.6 laptop...
June 25, 2015 at 11:40:01
Specs: Windows 7, 4 GB
While creating a macro I want to insert a tab stop. I press the Tab key, but the tab is not inserted. It's like the Tab key is dead/deactivated while in macro record mode. Does anyone have a solution?
Thanks
howagood

howagood


See More: Inserting a tab stop in a macro

Report •


✔ Best Answer
June 29, 2015 at 07:16:15
re: Alas, I do not know how to employ Chr(9) or vbTab while creating a macro.

In your first post you mentioned that you were recording the macro. I am not a Word macro expert, but if the macro recorder works the same as it does in Excel (and I'm sure it does) there are a lot of steps that don't get recorded. There is also a lot of unnecessary stuff that does get recorded, so you usually end up with bloated code when using the recorder.

In cases other than the simplest of recorded macros, the user usually has to go into the VBA editor and add the steps that weren't recorded and clean-up the bloated code to make it more efficient.

As I said, I'm not a Word VBA expert (Excel is where I hang out) but I can sometimes stumble my way through VBA for Word. If you would like me to look at your code and see if I can help add the instruction to insert the tab, you'll need to post the code and tell me when/where you think the tab instruction should be.

Before pasting the code into your response, please click on the following line and read the instructions on how to post VBA code in this forum. Thanks.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.



#1
June 25, 2015 at 13:08:03
howagood,

This is the second post you have made asking for help with a macro. In neither case have you told us what application you are working with.

In your previous post, you simply said MS Office 13. In this post you didn't even tell us that much.

Many, many applications allow for the use of macros, so unless you provide more details there is not much help we can offer.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •

#2
June 25, 2015 at 13:53:15
Sorry, DerbyDad03. The application in question is Microsoft Word 2013.
howagood

howagood


Report •

#3
June 26, 2015 at 04:03:51
Try using Chr(9) or vbTab

Without knowing more about what you want the end result to be, that's the best we can offer at this point.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

message edited by DerbyDad03


Report •

Related Solutions

#4
June 29, 2015 at 06:54:15
Alas, I do not know how to employ Chr(9) or vbTab while creating a macro.

In other news I made the following observation while editing a particular document in MS Word 2013, while in Print View. When I press the Tab key (whether or not in Macro mode), a Tab character (the familiar right-pointing arrow) does not appear. Nor does the end-of-paragraph mark appear to jog to the right.

Yet when I switch to Outline View I can see a tiny diamond symbol representing the tab insertion. Why does the tab not display in Print View? Very confusing.
Thanks.

howagood


Report •

#5
June 29, 2015 at 07:16:15
✔ Best Answer
re: Alas, I do not know how to employ Chr(9) or vbTab while creating a macro.

In your first post you mentioned that you were recording the macro. I am not a Word macro expert, but if the macro recorder works the same as it does in Excel (and I'm sure it does) there are a lot of steps that don't get recorded. There is also a lot of unnecessary stuff that does get recorded, so you usually end up with bloated code when using the recorder.

In cases other than the simplest of recorded macros, the user usually has to go into the VBA editor and add the steps that weren't recorded and clean-up the bloated code to make it more efficient.

As I said, I'm not a Word VBA expert (Excel is where I hang out) but I can sometimes stumble my way through VBA for Word. If you would like me to look at your code and see if I can help add the instruction to insert the tab, you'll need to post the code and tell me when/where you think the tab instruction should be.

Before pasting the code into your response, please click on the following line and read the instructions on how to post VBA code in this forum. Thanks.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •

#6
June 29, 2015 at 07:32:17
Thanks again, DerbyDad03. I think I stumbled on a solution. I just checked my default tab settings and found they were not set as intended. I corrected the settings, and now tab insertion seems to be behaving.
howagood

howagood


Report •

Ask Question