vba

Protecting and Hiding Columns same as “Very Hidden” Sheets

谁说胖子不能爱 提交于 2021-02-10 05:00:52
问题 I am trying to hide some columns and prevent the user to have any access to them; while they can edit other parts of the sheet. What I am seeking is something like: ActiveWorkbook.Sheets("Name").Visible = xlSheetVeryHidden So user cannot see them. I am aware that one option is adding another sheet and move those columns to there and hide that one sheet; but as I am working on a relatively large data-set and it has a standard format within the company, I prefer not to do so. I already tried

Protecting and Hiding Columns same as “Very Hidden” Sheets

淺唱寂寞╮ 提交于 2021-02-10 04:59:46
问题 I am trying to hide some columns and prevent the user to have any access to them; while they can edit other parts of the sheet. What I am seeking is something like: ActiveWorkbook.Sheets("Name").Visible = xlSheetVeryHidden So user cannot see them. I am aware that one option is adding another sheet and move those columns to there and hide that one sheet; but as I am working on a relatively large data-set and it has a standard format within the company, I prefer not to do so. I already tried

Protecting and Hiding Columns same as “Very Hidden” Sheets

梦想与她 提交于 2021-02-10 04:59:27
问题 I am trying to hide some columns and prevent the user to have any access to them; while they can edit other parts of the sheet. What I am seeking is something like: ActiveWorkbook.Sheets("Name").Visible = xlSheetVeryHidden So user cannot see them. I am aware that one option is adding another sheet and move those columns to there and hide that one sheet; but as I am working on a relatively large data-set and it has a standard format within the company, I prefer not to do so. I already tried

VBA To Add Formula To Cell

梦想的初衷 提交于 2021-02-10 04:56:13
问题 I am attempting to write some VBA which will add header text to 3 cells then fill a formula all the way down to the last row. I have written the below, which writes the headers no problems, but when it get's to my first .Formula it throws a Application Defined or Object Defined error What needs to be altered so that this macro will execute successfully? (The formulas were pulled directly from the formula in the cell, so I know they are valid formulas at least on the "front-end") Function Gre(

VBA Sort by selected by user range

一世执手 提交于 2021-02-10 04:16:47
问题 I've been struggling with this issue in the past 3 days, so please help... What I want to do is to when I run a macro1 (for the sake of the argument): Window would pop up to select a range of which cells should be sorted Have these sorted via last column selected (or the 5th) (lowest to highest numbers) The issue here is that selected area would change eveytime (I create something like a tree in excel), so it cannot be a specific column that needs to be sorted by the last one (or the 5th in

VBA Sort by selected by user range

巧了我就是萌 提交于 2021-02-10 04:14:32
问题 I've been struggling with this issue in the past 3 days, so please help... What I want to do is to when I run a macro1 (for the sake of the argument): Window would pop up to select a range of which cells should be sorted Have these sorted via last column selected (or the 5th) (lowest to highest numbers) The issue here is that selected area would change eveytime (I create something like a tree in excel), so it cannot be a specific column that needs to be sorted by the last one (or the 5th in

VBA Sort by selected by user range

余生长醉 提交于 2021-02-10 04:14:18
问题 I've been struggling with this issue in the past 3 days, so please help... What I want to do is to when I run a macro1 (for the sake of the argument): Window would pop up to select a range of which cells should be sorted Have these sorted via last column selected (or the 5th) (lowest to highest numbers) The issue here is that selected area would change eveytime (I create something like a tree in excel), so it cannot be a specific column that needs to be sorted by the last one (or the 5th in

VBA Sort by selected by user range

六月ゝ 毕业季﹏ 提交于 2021-02-10 04:13:30
问题 I've been struggling with this issue in the past 3 days, so please help... What I want to do is to when I run a macro1 (for the sake of the argument): Window would pop up to select a range of which cells should be sorted Have these sorted via last column selected (or the 5th) (lowest to highest numbers) The issue here is that selected area would change eveytime (I create something like a tree in excel), so it cannot be a specific column that needs to be sorted by the last one (or the 5th in

VBA Copy & Transpose Data Range

最后都变了- 提交于 2021-02-09 12:22:08
问题 I am working on setuping a few spreadsheets at work to streamline my work. I'm still new to VBA. I am trying to cut a range of data in a column (E6:E14) from Sheet1 and transposing the data before pasting the data in the next available row in Column A of Sheet2. Here is the code that I have written so far from trial and error. Everytime I run the code I get a Run-time error '1004'. I am trying to create a "database" in Sheet2. Any help is appreciate it. Sub Test() Worksheets("Sheet1").Range(

Subscript vs. Superscript conflict

吃可爱长大的小学妹 提交于 2021-02-09 11:59:05
问题 Background: I'm trying to write a module to concatenate strings with it's formatting. Therefor I'm looking in all Font properties that could matter, including Subscript and Superscript . Sample Data: Imagine in A1 : Sample Code: Sub Test() With Sheet1.Range("B1") .Value = .Offset(0, -1).Value For x = 1 To .Characters.Count .Characters(x, 1).Font.Subscript = .Offset(0, -1).Characters(x, 1).Font.Subscript .Characters(x, 1).Font.Superscript = .Offset(0, -1).Characters(x, 1).Font.Superscript Next