CAN I USE VBA TO READ THE MACHINE CODE OF THE COMPUTER IN EXCEL?

Updated on Game 2024-03-17
14 answers
  1. Anonymous users2024-02-06

    oleobject object.

    See the Properties Method Event Property.

    sheets

    oleobjects (oleobject)

    borders (border)

    interior

    Returns an ActiveX control or a linked or inline OLE object in the worksheet. An OleObjects object is a member of the OleObjects collection. The OleObjects collection contains all the OLE objects in a single worksheet.

    Usage of the oleobject object.

    You can use OleObjects(index) to return an OleObject object, where Index is the object name or number. In the following example, OLE object one in sheet1 is removed.

    worksheets("sheet1").oleobjects(1).delete

    In the following example, the OLE object named "listbox1" is deleted.

    worksheets("sheet1").oleobjects("listbox1").delete

    The properties and methods of the OleObject object that illustrate the ActiveX control on the worksheet are the same. This way, by using the control name, Visual Basic can access these properties. In the following example, select the checkbox control "mycheckbox", make it align with the active cell, and then activate the control.

    with mycheckbox

    value = true

    top =activate

    end with

    For more information, see Use ActiveX controls on worksheets.

  2. Anonymous users2024-02-05

    worksheet(1).You can root the name of the control directly.

    Such as worksheet(1).to get the value.

  3. Anonymous users2024-02-04

    You can dim wb as workbook, a&set wb = getobject("The full path to the file")with wb

    for a = 1 to

    if sheets(a).name = "April" then.sheets(1).range().copy thisworkbook

    Name"end with

    The specific operation needs to be done by looking at the data.

  4. Anonymous users2024-02-03

    The essence is open, just the window is not visible.

    dimwbasworkbook

    setwbgetobject (specific path + file).

    withwb...operationonwb)

    endwith

    falsesetwb=nothing

  5. Anonymous users2024-02-02

    sheets("sheet3").cells(1,2)

    The contents of the first row and second column of the form are named sheet3.

  6. Anonymous users2024-02-01

    Enter "=mid(a1,min(find(,a1&"0123456789"))20)" in b2

    2. Put forward all the numbers in the cell. Macros can be used. Open the VBA first. Tools - Macros - Visual Basic.

    function zzsz(xstr as string) as stringdim i as integerfor i = 1 to len(xstr)if isnumeric(mid(xstr, i, 1)) then zzsz = zzsz & mid(xstr, i, 1)nextend function

    4. Go back to the worksheet and type "=zzsz(A2)" in cell B2. You can use VBA to extract all the numbers in cell A2, as shown in the figure.

    How excel only extracts the numbers in **.

    5. Specify the number of arrays to start with. That is, in those numbers that are not sequential, the extraction starts from the array that appears several times. Also in the module there enter the following **:

    function getnums(rcell as range, num as integer) as stringdim arr1() as string, arr2() as stringdim chr as string, str as stringdim i as integer, j as integeron error goto line1

    str = i = 1 to len(str)chr = mid(str, i, 1)if (asc(chr) 《48 or asc(chr) 》57) thenstr = replace(str, chr, “end ifnext

    arr1 = split(trim(str))redim arr2(ubound(arr1))for i = 0 to ubound(arr1)if arr1(i) 《thenarr2(j) = arr1(i)j = j + 1end ifnext

    getnums = iif(num 《= j, arr2(num - 1), line1:end function

  7. Anonymous users2024-01-31

    If the attachment is done, ask if you have any questions.

    alt+f8.

  8. Anonymous users2024-01-30

    Do your first two tables have fixed names that don't need to be extracted?

  9. Anonymous users2024-01-29

    Get the value of a1 in the first worksheet (table name aa) and assign it to xx=sheets(1).[a1]

    or x=sheets("aa").a1]x=sheets(1).cells(1,1)x=sheets(“aa”).cells(1,1)

  10. Anonymous users2024-01-28

    Get the value of cell A1 in sheet 1:

    1).value

  11. Anonymous users2024-01-27

    Via the function sheets(!) in VBAto point the current file pointer to the specified worksheet in the selected workbook.

    Parameter description: The workbook is the name of the workbook, that is, the name of the file.

    worksheet is the name of the worksheet.

    Once the file pointer is set, you can manipulate the specified worksheet for the specified file.

  12. Anonymous users2024-01-26

    1. The problem itself is a problem, what does it mean to read all the data in excel?

    2. Using arrays to read excel data is the most scientific.

    dim a()

    a()=range("a1:d25")

    3. What kind of processing should be done with the data after reading it?

  13. Anonymous users2024-01-25

    ,j) Represents the data in the cells of row I and column J, and all the data can be read out by doing a loop.

  14. Anonymous users2024-01-24

    There's nothing wrong with reading, and then what?

Related questions
16 answers2024-03-17

Here's a look: excel toolset 00130 generates random numbers (random time, random integers, random values, unique random values).

10 answers2024-03-17

I'm going to recommend two good books, you can take a look. >>>More

30 answers2024-03-17

Select the text or paragraph to be copied Click on the format brush icon, and then drag the mouse to brush other words or paragraphs when the mouse becomes brush-like, so that the later text or paragraph format is the same as the previous format. If you need to copy the same format multiple times, you can select the text or paragraph to be copied, double-click the format brush, and then drag the mouse to brush other words or paragraphs, and you can drag again. When you're done, click the format painter again or press the esc key (the mouse will revert to its original state). >>>More

12 answers2024-03-17

If you have a foundation in accounting, you can play freely. >>>More